| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | |
| public static enum | JavaEmitter.
Style of code emission. |
| public static enum | JavaEmitter.
Access control for emitted Java methods. |
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| protected JavaConfiguration | |
| private String | |
| private final Map | |
| private PrintWriter | |
| private static final String | |
| private static final Type | |
| private String | |
| private PrintWriter | |
| private PrintWriter | |
| private StructLayout | |
| protected final Logging. | |
| private final MachineDataInfo | |
| private final MachineDataInfo. | |
| private static final String | |
| private static final String | |
| private static final String | |
| private boolean | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static int | addStrings2Buffer(StringBuilder buf, final String sep, final String first, final Collection<String> col)
|
| public void | |
| public void | beginEmission(final GlueEmitterControls controls)
Implements com. |
| public void | beginFunctions(final TypeDictionary typedefDictionary, final TypeDictionary structDictionary, final Map<Type, Type> canonMap)
Implements com. |
| public void | beginStructLayout()
Implements com. |
| public void | beginStructs(final TypeDictionary typedefDictionary, final TypeDictionary structDictionary, final Map<Type, Type> canonMap)
Implements com. |
| private MethodBinding | bindFunction(FunctionSymbol sym, final boolean forInterface, final MachineDataInfo curMachDesc, final JavaType containingType, final Type containingCType)
Maps the C types in the specified function to Java types through the MethodBinding interface. |
| private Type | |
| private final String | |
| protected String | |
| private void | |
| private void | |
| private String | compatiblePrimitiveJavaTypeName(final Type fieldType, final JavaType javaType, final MachineDataInfo curMachDesc)
|
| protected JavaConfiguration | createConfig()
Create the object that will read and store configuration information for this JavaEmitter. |
| protected PrintWriter | |
| protected void | emitAllFileFooters()
Write out any footer information for the output files (closing brace of class definition, etc). |
| protected void | emitAllFileHeaders()
Write out any header information for the output files (class declaration and opening brace, import statements, etc). |
| protected void | |
| protected void | |
| protected void | emitCustomJavaCode(final PrintWriter writer, final String className)
Emit all the strings specified in the "CustomJavaCode" parameters of the configuration file. |
| public void | emitDefine(final ConstantDefinition def, final String
If optionalComment is non-null, the emitter can
emit that string as a comment providing extra information about the
define. optionalComment)Implements com. |
| public Iterator | emitFunctions(final List<FunctionSymbol> funcsToBind)
Implements com. |
| protected void | |
| public void | emitStruct(final CompoundType structCType, final Type structCTypedefPtr)
Implements com. |
| public void | |
| public void | endEmission()
Implements com. |
| public void | |
| public void | endStructLayout()
Implements com. |
| public void | |
| protected List | |
| private void | generateArrayGetterSetterCode(final Set<MethodBinding> methodBindingSet, final PrintWriter javaWriter, final PrintWriter jniWriter, final CompoundType structCType, final String structCTypeName, final String structClassPkgName, final Type containingCType, final JavaType containingJType, final int i, final Field field, final String fieldName, final String returnSizeLookupName)
|
| private void | generateArrayPointerCode(final Set<MethodBinding> methodBindingSet, final PrintWriter javaWriter, final PrintWriter jniWriter, final String structCTypeName, final String structClassPkgName, final Type containingCType, final JavaType containingJType, final int i, final FunctionSymbol funcSym, final String returnSizeLookupName, final String docArrayLenExpr, final String nativeArrayLenExpr)
|
| private void | generateFunctionPointerCode(final Set<MethodBinding> methodBindingSet, final PrintWriter javaWriter, final PrintWriter jniWriter, final String structCTypeName, final String structClassPkgName, final Type containingCType, final JavaType containingJType, final int i, final FunctionSymbol funcSym, final String returnSizeLookupName)
|
| private void | generateGetterSignature(final PrintWriter writer, final Type origFieldType, final boolean staticMethod, final boolean abstractMethod, final String returnTypeName, final String fieldName, final String capitalizedFieldName, final String customArgs, final String arrayLengthExpr)
|
| protected List | generateMethodBindingEmitters(final FunctionSymbol sym)
Generate all appropriate Java bindings for the specified C function symbols. |
| private void | generateMethodBindingEmittersImpl(final ArrayList<FunctionEmitter> allEmitters, final FunctionSymbol sym, final boolean forInterface)
|
| private void | generateOffsetAndSizeArrays(final PrintWriter writer, final String prefix, final String fieldName, final Type fieldType, final Field field, final String postfix)
|
| protected void | generatePrivateEmitters(final MethodBinding binding, final List<FunctionEmitter> allEmitters)
Generates the private emitters for this MethodBinding. |
| protected void | generatePublicEmitters(final MethodBinding binding, final List<FunctionEmitter> allEmitters, final boolean signatureOnly)
Generates the public emitters for this MethodBinding which will produce either simply signatures (for the interface class, if any) or function definitions with or without a body (depending on whether or not the implementing function can go directly to native code because it doesn't need any processing of the outgoing arguments). |
| private void | generateSetterSignature(final PrintWriter writer, final Type origFieldType, final boolean abstractMethod, final String returnTypeName, final String fieldName, final String capitalizedFieldName, final String customArgsPre, final String paramTypeName, final String customArgsPost, final String arrayLengthExpr)
|
| private String | getArrayArrayLengthExpr(final ArrayType type, final String returnSizeLookupName, final boolean[] hasFixedTypeLen, final int[][] lengthRes)
|
| public String[] | |
| protected JavaConfiguration | |
| public JavaConfiguration | |
| protected String | getImplPackageName()
Returns the value that was specified by the configuration directive "ImplPackage", or the default if none was specified. |
| protected String | getJavaOutputDir()
Returns the value that was specified by the configuration directive "JavaOutputDir", or the default if none was specified. |
| protected String | getJavaPackageName()
Returns the value that was specified by the configuration directive "Package", or the default if none was specified. |
| protected static String | getJNIMethodNamePrefix(final String javaPackageName, final String javaClassName)
Returns the JNI method prefix consisting our of mangled package- and class-name |
| private StructLayout | |
| private String | |
| private static boolean | |
| private boolean | |
| private boolean | |
| protected String | |
| protected PrintWriter | |
| private JavaType | |
| protected PrintWriter | |
| protected static String | |
| public void | layoutStruct(final CompoundType t)
Implements com. |
| private MethodBinding | lowerMethodBindingPointerTypes(final MethodBinding inputBinding, final boolean convertToArrays, final boolean[] canProduceArrayVariant)
|
| protected void | mangleBinding(final MethodBinding binding)
Allow specializations to modify the given |
| protected PrintWriter | |
| private void | |
| protected void | prepCEmitter(final String returnSizeLookupName, final JavaType javaReturnType, final CMethodBindingEmitter cEmitter)
|
| public void | readConfigurationFile(final String filename)
Implements com. |
| private boolean | |
| protected final boolean | requiresStaticInitialization(final String clazzName)
Returns |
| private JavaType | |
| private JavaType |