|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatavism.server.marshalling.InjectionGenerator
public class InjectionGenerator
Nested Class Summary | |
---|---|
static class |
InjectionGenerator.BranchFixup
|
static class |
InjectionGenerator.PrimitiveTypeInfo
|
Field Summary | |
---|---|
protected boolean |
generateClassFiles
|
protected static InjectionGenerator |
instance
|
protected boolean |
listGeneratedCode
|
protected java.lang.String |
outputDir
|
protected static InjectionGenerator.PrimitiveTypeInfo[] |
primitiveTypes
|
Constructor Summary | |
---|---|
InjectionGenerator(boolean generateClassFiles,
java.lang.String outputDir,
boolean listGeneratedCode)
InjectionGenerator constructor |
Method Summary | |
---|---|
protected void |
addAOByteBufferFieldGet(JavaClass clazz,
Field f,
Type fieldType,
InjectionGenerator.PrimitiveTypeInfo info,
InstructionFactory factory,
InstructionList il)
|
protected void |
addAOByteBufferFieldPut(JavaClass clazz,
Field f,
Type fieldType,
InjectionGenerator.PrimitiveTypeInfo info,
InstructionFactory factory,
InstructionList il)
|
protected void |
addFieldFetch(JavaClass clazz,
InstructionFactory factory,
Field f,
InstructionList il)
|
protected void |
addMarshallingForField(JavaClass clazz,
Field f,
InstructionFactory factory,
InstructionList il)
|
protected void |
addStack(int count)
|
protected void |
addUnmarshallingForField(JavaClass clazz,
Field f,
InstructionFactory factory,
ConstantPoolGen cp,
InstructionList il)
|
protected java.lang.String |
aggregateTypeString(ObjectType fieldObjectType)
|
protected MethodGen |
createMarshallingMethod(JavaClass clazz,
JavaClass superclass,
ConstantPoolGen cp,
InstructionFactory factory,
java.util.LinkedList<Field> fields,
java.util.LinkedList<java.lang.Integer> nullTestedFields,
int flagBitCount)
Create the marshalObject method |
protected MethodGen |
createUnmarshallingMethod(JavaClass clazz,
JavaClass superclass,
ConstantPoolGen cp,
InstructionFactory factory,
java.util.LinkedList<Field> fields,
java.util.LinkedList<java.lang.Integer> nullTestedFields,
int flagBitCount)
Create the unmarshalObject method |
protected boolean |
doesOrWillHandleMarshallable(ObjectType type)
|
protected java.lang.Short |
getAggregateTypeNum(ObjectType fieldObjectType)
|
protected int |
getFinalStack()
|
static InjectionGenerator |
getInstance()
Get the InjectionGenerator singleton instance |
protected static InjectionGenerator.PrimitiveTypeInfo |
getPrimitiveTypeInfo(Type type)
|
protected static java.util.LinkedList<Field> |
getValidClassFields(JavaClass c)
|
static JavaClass |
getValidSuperclass(JavaClass c)
|
static boolean |
handlesMarshallable(JavaClass clazz)
|
protected boolean |
handlesMarshallable(ObjectType type)
|
static void |
initialize(boolean generateClassFiles,
java.lang.String outputDir,
boolean listGeneratedCode)
|
protected void |
initializeGlobals()
|
protected void |
initStack()
|
protected JavaClass |
injectMarshallingMethods(JavaClass clazz,
JavaClass superclass,
java.util.LinkedList<Field> fields,
java.util.LinkedList<java.lang.Integer> nullTestedFields,
int flagBitCount)
Inject the marshalling methods for this class |
static boolean |
interfaceClass(java.lang.String s)
|
protected static boolean |
isPrimitiveObjectType(Type type)
|
protected static boolean |
isPrimitiveType(Type type)
|
protected boolean |
isStringType(Type type)
|
protected void |
logGeneratedMethod(ClassGen classGen,
MethodGen method)
|
protected static void |
logInvoke(java.lang.String s,
InvokeInstruction iv,
ConstantPoolGen cp)
|
protected static JavaClass |
lookupClass(java.lang.String className)
|
protected InjectionGenerator.BranchFixup[] |
makeOmittedTest(JavaClass clazz,
Field f,
InstructionFactory factory,
InstructionList il)
|
protected boolean |
marshalledByMarshallingRuntimeMarshalObject(ObjectType fieldObjectType)
|
JavaClass |
maybeInjectMarshalling(JavaClass clazz,
java.lang.Short typeNum)
This is the public method called by MarshallingRuntime to inject marshalling methods into the clazz argument |
protected static java.lang.String |
nonPrimitiveObjectTypeName(Type type)
|
protected void |
noteBranchTargets(InjectionGenerator.BranchFixup[] branchFixups,
InstructionList il)
|
protected boolean |
objectTypeIsInterface(ObjectType type)
|
protected boolean |
referencesInterface(ObjectType type)
|
protected Type |
storageType(Type type)
|
protected static void |
throwError(java.lang.String msg)
|
protected Type |
underlyingPrimitiveType(Type type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean generateClassFiles
protected java.lang.String outputDir
protected boolean listGeneratedCode
protected static InjectionGenerator.PrimitiveTypeInfo[] primitiveTypes
protected static InjectionGenerator instance
Constructor Detail |
---|
public InjectionGenerator(boolean generateClassFiles, java.lang.String outputDir, boolean listGeneratedCode)
generateClassFiles
- True if we should generate new class files
containing injected methods. This is used by the batch injection code.outputDir
- If not the empty string, this is the directory in
which generated class files should be stored.listGeneratedCode
- True if we should log the generated methods
in the log file. This is only set when debugging InjectionGenerator.Method Detail |
---|
public static InjectionGenerator getInstance()
public JavaClass maybeInjectMarshalling(JavaClass clazz, java.lang.Short typeNum)
clazz
- The BCEL JavaClass instance representing the class filetypeNum
- The type number for the class
protected JavaClass injectMarshallingMethods(JavaClass clazz, JavaClass superclass, java.util.LinkedList<Field> fields, java.util.LinkedList<java.lang.Integer> nullTestedFields, int flagBitCount)
protected void logGeneratedMethod(ClassGen classGen, MethodGen method)
protected MethodGen createMarshallingMethod(JavaClass clazz, JavaClass superclass, ConstantPoolGen cp, InstructionFactory factory, java.util.LinkedList<Field> fields, java.util.LinkedList<java.lang.Integer> nullTestedFields, int flagBitCount)
protected void addMarshallingForField(JavaClass clazz, Field f, InstructionFactory factory, InstructionList il)
protected void addAOByteBufferFieldPut(JavaClass clazz, Field f, Type fieldType, InjectionGenerator.PrimitiveTypeInfo info, InstructionFactory factory, InstructionList il)
protected InjectionGenerator.BranchFixup[] makeOmittedTest(JavaClass clazz, Field f, InstructionFactory factory, InstructionList il)
protected MethodGen createUnmarshallingMethod(JavaClass clazz, JavaClass superclass, ConstantPoolGen cp, InstructionFactory factory, java.util.LinkedList<Field> fields, java.util.LinkedList<java.lang.Integer> nullTestedFields, int flagBitCount)
protected void addUnmarshallingForField(JavaClass clazz, Field f, InstructionFactory factory, ConstantPoolGen cp, InstructionList il)
protected void addAOByteBufferFieldGet(JavaClass clazz, Field f, Type fieldType, InjectionGenerator.PrimitiveTypeInfo info, InstructionFactory factory, InstructionList il)
protected void addFieldFetch(JavaClass clazz, InstructionFactory factory, Field f, InstructionList il)
protected static JavaClass lookupClass(java.lang.String className)
protected static InjectionGenerator.PrimitiveTypeInfo getPrimitiveTypeInfo(Type type)
protected boolean isStringType(Type type)
protected static boolean isPrimitiveObjectType(Type type)
protected static boolean isPrimitiveType(Type type)
protected static java.lang.String nonPrimitiveObjectTypeName(Type type)
protected Type underlyingPrimitiveType(Type type)
protected Type storageType(Type type)
protected java.lang.Short getAggregateTypeNum(ObjectType fieldObjectType)
protected java.lang.String aggregateTypeString(ObjectType fieldObjectType)
protected boolean marshalledByMarshallingRuntimeMarshalObject(ObjectType fieldObjectType)
protected boolean referencesInterface(ObjectType type)
protected boolean doesOrWillHandleMarshallable(ObjectType type)
protected boolean handlesMarshallable(ObjectType type)
public static boolean handlesMarshallable(JavaClass clazz)
protected boolean objectTypeIsInterface(ObjectType type)
public static boolean interfaceClass(java.lang.String s)
protected static java.util.LinkedList<Field> getValidClassFields(JavaClass c)
public static JavaClass getValidSuperclass(JavaClass c)
protected void noteBranchTargets(InjectionGenerator.BranchFixup[] branchFixups, InstructionList il)
protected void initStack()
protected void addStack(int count)
protected int getFinalStack()
protected static void logInvoke(java.lang.String s, InvokeInstruction iv, ConstantPoolGen cp)
protected static void throwError(java.lang.String msg)
protected void initializeGlobals()
public static void initialize(boolean generateClassFiles, java.lang.String outputDir, boolean listGeneratedCode)
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |