public class ProcAddressEmitter extends JavaEmitter
JavaEmitter.EmissionStyle, JavaEmitter.MethodAccess| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
emittedTableEntries |
static String |
PROCADDRESS_VAR_PREFIX
Must be synchronized w/ ProcAddressTable.PROCADDRESS_VAR_PREFIX !!!
|
protected String |
tableClassName |
protected String |
tableClassPackage |
protected PrintWriter |
tableWriter |
protected static String |
WRAP_PREFIX |
cfg, LOG| Constructor and Description |
|---|
ProcAddressEmitter() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginFunctions(TypeDictionary typedefDictionary,
TypeDictionary structDictionary,
Map<Type,Type> canonMap) |
protected void |
beginProcAddressTable() |
void |
beginStructs(TypeDictionary typedefDictionary,
TypeDictionary structDictionary,
Map<Type,Type> canonMap) |
protected JavaConfiguration |
createConfig()
Create the object that will read and store configuration information for
this JavaEmitter.
|
protected void |
emitProcAddressTableEntryForString(String str) |
void |
endFunctions() |
protected void |
endProcAddressTable() |
protected void |
fixSecurityModifiers(JavaMethodBindingEmitter javaEmitter)
If 'native', enforce 'private native' modifiers.
|
protected List<? extends FunctionEmitter> |
generateMethodBindingEmitters(Set<MethodBinding> methodBindingSet,
FunctionSymbol sym)
Generate all appropriate Java bindings for the specified C function
symbols.
|
protected void |
generateModifiedEmitters(CMethodBindingEmitter baseCEmitter,
List<FunctionEmitter> emitters) |
protected void |
generateModifiedEmitters(JavaMethodBindingEmitter baseJavaEmitter,
List<FunctionEmitter> emitters) |
protected String |
getFunctionPointerTypedefName(FunctionSymbol sym)
Returns the name of the typedef for a pointer to the function
represented by the argument as defined by the ProcAddressNameExpr
in the .cfg file.
|
protected ProcAddressConfiguration |
getProcAddressConfig() |
protected boolean |
needsModifiedEmitters(FunctionSymbol sym) |
protected boolean |
needsProcAddressWrapper(FunctionSymbol sym) |
String |
runtimeExceptionType() |
String |
unsupportedExceptionType() |
addStrings2Buffer, beginDefines, beginEmission, beginStructLayout, cWriter, emitAllFileFooters, emitAllFileHeaders, emitCHeader, emitCInitCode, emitCustomJavaCode, emitDefine, emitFunctions, emitJavaInitCode, emitStruct, endDefines, endEmission, endStructLayout, endStructs, expandMethodBinding, generatePrivateEmitters, generatePublicEmitters, getConfig, getImplPackageName, getJavaOutputDir, getJavaPackageName, getJavaRadix, getJavaType, getJavaType, getJavaValue, getJNIMethodNamePrefix, javaImplWriter, javaWriter, jniMangle, layoutStruct, openFile, prepCEmitter, readConfigurationFile, requiresStaticInitializationpublic static final String PROCADDRESS_VAR_PREFIX
protected static final String WRAP_PREFIX
protected PrintWriter tableWriter
protected String tableClassPackage
protected String tableClassName
public void beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap) throws Exception
beginFunctions in interface GlueEmitterbeginFunctions in class JavaEmitterExceptionpublic void endFunctions()
throws Exception
endFunctions in interface GlueEmitterendFunctions in class JavaEmitterExceptionpublic void beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap) throws Exception
beginStructs in interface GlueEmitterbeginStructs in class JavaEmitterExceptionpublic String runtimeExceptionType()
public String unsupportedExceptionType()
protected JavaConfiguration createConfig()
JavaEmittercreateConfig in class JavaEmitterprotected List<? extends FunctionEmitter> generateMethodBindingEmitters(Set<MethodBinding> methodBindingSet, FunctionSymbol sym) throws Exception
JavaEmittergenerateMethodBindingEmitters in class JavaEmitterExceptionprotected boolean needsModifiedEmitters(FunctionSymbol sym)
protected String getFunctionPointerTypedefName(FunctionSymbol sym)
protected void fixSecurityModifiers(JavaMethodBindingEmitter javaEmitter)
protected void generateModifiedEmitters(JavaMethodBindingEmitter baseJavaEmitter, List<FunctionEmitter> emitters)
protected void generateModifiedEmitters(CMethodBindingEmitter baseCEmitter, List<FunctionEmitter> emitters)
protected boolean needsProcAddressWrapper(FunctionSymbol sym)
protected void emitProcAddressTableEntryForString(String str)
protected ProcAddressConfiguration getProcAddressConfig()