@Internal public abstract class AbstractClassFileWriter extends java.lang.Object implements org.objectweb.asm.Opcodes
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CONSTRUCTOR_NAME |
protected static int |
DEFAULT_MAX_STACK |
protected static java.lang.String |
DESCRIPTOR_DEFAULT_CONSTRUCTOR |
protected static org.objectweb.asm.commons.Method |
METHOD_DEFAULT_CONSTRUCTOR |
protected static java.util.Map<java.lang.String,java.lang.String> |
NAME_TO_TYPE_MAP |
protected Element |
originatingElement |
protected static org.objectweb.asm.Type |
TYPE_ARGUMENT |
protected static org.objectweb.asm.Type |
TYPE_ARGUMENT_ARRAY |
protected static org.objectweb.asm.Type |
TYPE_CLASS |
protected static org.objectweb.asm.Type |
TYPE_GENERATED |
protected static org.objectweb.asm.Type |
TYPE_OBJECT |
protected static java.lang.String |
ZERO_ARGUMENTS_CONSTANT |
AALOAD, AASTORE, ACC_ABSTRACT, ACC_ANNOTATION, ACC_BRIDGE, ACC_DEPRECATED, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_MANDATED, ACC_MODULE, ACC_NATIVE, ACC_OPEN, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STATIC_PHASE, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_TRANSITIVE, ACC_VARARGS, ACC_VOLATILE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASM4, ASM5, ASM6, ASM7, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CASTORE, CHECKCAST, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DLOAD, DMUL, DNEG, DOUBLE, DREM, DRETURN, DSTORE, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F_APPEND, F_CHOP, F_FULL, F_NEW, F_SAME, F_SAME1, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FLOAD, FLOAT, FMUL, FNEG, FREM, FRETURN, FSTORE, FSUB, GETFIELD, GETSTATIC, GOTO, H_GETFIELD, H_GETSTATIC, H_INVOKEINTERFACE, H_INVOKESPECIAL, H_INVOKESTATIC, H_INVOKEVIRTUAL, H_NEWINVOKESPECIAL, H_PUTFIELD, H_PUTSTATIC, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD, IMUL, INEG, INSTANCEOF, INTEGER, INVOKEDYNAMIC, INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, JSR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDC, LDIV, LLOAD, LMUL, LNEG, LONG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, NEW, NEWARRAY, NOP, NULL, POP, POP2, PUTFIELD, PUTSTATIC, RET, RETURN, SALOAD, SASTORE, SIPUSH, SOURCE_DEPRECATED, SOURCE_MASK, SWAP, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_SHORT, TABLESWITCH, TOP, UNINITIALIZED_THIS, V_PREVIEW, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8, V10, V11, V12, V13, V14, V9
Modifier | Constructor and Description |
---|---|
protected |
AbstractClassFileWriter(Element originatingElement) |
Modifier and Type | Method and Description |
---|---|
abstract void |
accept(ClassWriterOutputVisitor classWriterOutputVisitor)
Accept a ClassWriterOutputVisitor to write this writer to disk.
|
protected static void |
buildArgument(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter,
java.lang.String argumentName,
java.lang.Object objectType)
Builds an argument instance.
|
protected void |
generateServiceDescriptor(java.lang.String className,
GeneratedFile generatedFile)
Generates a service discovery for the given class name and file.
|
protected java.lang.String |
getClassFileName(java.lang.String className) |
protected static java.lang.String |
getConstructorDescriptor(java.util.Collection<java.lang.Object> argList) |
protected static java.lang.String |
getConstructorDescriptor(java.lang.Object... argumentTypes) |
protected static java.lang.String |
getInternalName(java.lang.String className) |
protected static java.lang.String |
getInternalNameForCast(java.lang.Object type) |
protected static java.lang.String |
getMethodDescriptor(java.lang.Object returnType,
java.util.Collection<java.lang.Object> argumentTypes) |
protected static java.lang.String |
getMethodDescriptor(java.lang.String returnType,
java.lang.String... argumentTypes) |
protected static java.lang.String |
getMethodSignature(java.lang.String returnTypeReference,
java.lang.String... argReferenceTypes) |
protected static org.objectweb.asm.Type |
getObjectType(java.lang.Object type) |
protected org.objectweb.asm.Type[] |
getObjectTypes(java.util.Collection types) |
Element |
getOriginatingElement() |
protected static java.lang.String |
getTypeDescriptor(java.lang.Object type)
Returns the descriptor corresponding to the given class.
|
protected static java.lang.String |
getTypeDescriptor(java.lang.String className,
java.lang.String... genericTypes) |
protected static org.objectweb.asm.Type |
getTypeReference(java.lang.Object type)
Return the type reference for a class.
|
protected static org.objectweb.asm.Type |
getTypeReference(TypedElement type)
Return the type reference for a class.
|
protected static org.objectweb.asm.Type |
getTypeReferenceForName(java.lang.String className,
java.lang.String... genericTypes)
Returns the Type reference corresponding to the given class.
|
protected static java.lang.Class |
getWrapperType(java.lang.Object type) |
protected void |
invokeConstructor(org.objectweb.asm.MethodVisitor cv,
java.lang.Class superClass,
java.lang.Class... argumentTypes) |
protected static void |
invokeInterfaceStaticMethod(org.objectweb.asm.MethodVisitor visitor,
java.lang.Class targetType,
org.objectweb.asm.commons.Method method) |
protected static boolean |
isPrimitive(java.lang.Object type) |
protected ClassWriterOutputVisitor |
newClassWriterOutputVisitor(java.io.File compilationDir) |
protected static void |
pushBoxPrimitiveIfNecessary(java.lang.Object fieldType,
org.objectweb.asm.MethodVisitor injectMethodVisitor) |
protected static void |
pushBuildArgumentsForMethod(org.objectweb.asm.Type owningType,
org.objectweb.asm.ClassWriter declaringClassWriter,
org.objectweb.asm.commons.GeneratorAdapter generatorAdapter,
java.util.Map<java.lang.String,java.lang.Object> argumentTypes,
java.util.Map<java.lang.String,AnnotationMetadata> argumentAnnotationMetadata,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> genericTypes,
java.util.Map<java.lang.String,org.objectweb.asm.commons.GeneratorAdapter> loadTypeMethods) |
protected static void |
pushCastToType(org.objectweb.asm.MethodVisitor methodVisitor,
java.lang.Object type) |
protected static void |
pushMethodNameAndTypesArguments(org.objectweb.asm.commons.GeneratorAdapter methodVisitor,
java.lang.String methodName,
java.util.Collection<java.lang.Object> argumentTypes) |
protected static void |
pushNewArray(org.objectweb.asm.commons.GeneratorAdapter methodVisitor,
java.lang.Class arrayType,
int size) |
protected void |
pushNewInstance(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter,
org.objectweb.asm.Type typeToInstantiate)
Push the instantiation of the given type.
|
protected static void |
pushReturnValue(org.objectweb.asm.MethodVisitor methodVisitor,
java.lang.Object type) |
protected static void |
pushStoreInArray(org.objectweb.asm.commons.GeneratorAdapter methodVisitor,
int index,
int size,
java.lang.Runnable runnable) |
protected static void |
pushStoreStringInArray(org.objectweb.asm.commons.GeneratorAdapter methodVisitor,
int index,
int size,
java.lang.String string) |
protected static void |
pushStoreTypeInArray(org.objectweb.asm.commons.GeneratorAdapter methodVisitor,
int index,
int size,
java.lang.Object type) |
protected static void |
pushTypeArgumentElements(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter,
TypedElement declaringElement,
java.util.Map<java.lang.String,ClassElement> types)
Pushes type arguments onto the stack.
|
protected static void |
pushTypeArguments(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter,
java.util.Map<java.lang.String,java.lang.Object> types)
Pushes type arguments onto the stack.
|
protected void |
returnVoid(org.objectweb.asm.commons.GeneratorAdapter overriddenMethodGenerator) |
protected void |
startClass(org.objectweb.asm.ClassVisitor classWriter,
java.lang.String className,
org.objectweb.asm.Type superType) |
protected void |
startClass(org.objectweb.asm.ClassWriter classWriter,
java.lang.String className,
org.objectweb.asm.Type superType,
java.lang.String genericSignature) |
protected org.objectweb.asm.commons.GeneratorAdapter |
startConstructor(org.objectweb.asm.ClassVisitor classWriter) |
protected org.objectweb.asm.commons.GeneratorAdapter |
startConstructor(org.objectweb.asm.ClassVisitor classWriter,
java.lang.Object... argumentTypes) |
protected void |
startFinalClass(org.objectweb.asm.ClassVisitor classWriter,
java.lang.String className,
org.objectweb.asm.Type superType) |
protected org.objectweb.asm.commons.GeneratorAdapter |
startProtectedMethod(org.objectweb.asm.ClassWriter writer,
java.lang.String methodName,
java.lang.String returnType,
java.lang.String... argumentTypes) |
protected void |
startPublicClass(org.objectweb.asm.ClassVisitor classWriter,
java.lang.String className,
org.objectweb.asm.Type superType) |
protected void |
startPublicFinalClass(org.objectweb.asm.ClassVisitor classWriter,
java.lang.String className,
org.objectweb.asm.Type superType)
Starts a public final class.
|
protected org.objectweb.asm.commons.GeneratorAdapter |
startPublicFinalMethodZeroArgs(org.objectweb.asm.ClassWriter classWriter,
java.lang.Class returnType,
java.lang.String methodName) |
protected org.objectweb.asm.commons.GeneratorAdapter |
startPublicMethod(org.objectweb.asm.ClassWriter writer,
java.lang.String methodName,
java.lang.String returnType,
java.lang.String... argumentTypes) |
protected org.objectweb.asm.commons.GeneratorAdapter |
startPublicMethodZeroArgs(org.objectweb.asm.ClassWriter classWriter,
java.lang.Class returnType,
java.lang.String methodName) |
protected void |
startService(org.objectweb.asm.ClassVisitor classWriter,
java.lang.Class<?> serviceType,
java.lang.String internalClassName,
org.objectweb.asm.Type superType) |
protected void |
startService(org.objectweb.asm.ClassVisitor classWriter,
java.lang.String serviceName,
java.lang.String internalClassName,
org.objectweb.asm.Type superType) |
protected @NotNull java.util.Map<java.lang.String,java.lang.Object> |
toParameterTypes(ParameterElement... parameters)
Converts a parameters to type arguments.
|
protected @NotNull java.util.Map<java.lang.String,java.lang.Object> |
toTypeArguments(@NotNull java.util.Map<java.lang.String,ClassElement> typeArguments)
Converts a map of class elements to type arguments.
|
protected @NotNull java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> |
toTypeArguments(ParameterElement... parameters)
Converts a map of class elements to type arguments.
|
protected org.objectweb.asm.commons.GeneratorAdapter |
visitStaticInitializer(org.objectweb.asm.ClassVisitor classWriter) |
protected void |
writeBooleanMethod(org.objectweb.asm.ClassWriter classWriter,
java.lang.String methodName,
java.util.function.Supplier<java.lang.Boolean> valueSupplier)
Writes a method that returns a boolean value with the value supplied by the given supplier.
|
protected void |
writeClassToDisk(java.io.File targetDir,
org.objectweb.asm.ClassWriter classWriter,
java.lang.String className)
Writes the class file to disk in the given directory.
|
protected void |
writeClassToDisk(java.io.OutputStream out,
org.objectweb.asm.ClassWriter classWriter) |
void |
writeTo(java.io.File targetDir)
Write the class to the target directory.
|
protected static final org.objectweb.asm.Type TYPE_ARGUMENT
protected static final org.objectweb.asm.Type TYPE_ARGUMENT_ARRAY
protected static final java.lang.String ZERO_ARGUMENTS_CONSTANT
protected static final java.lang.String CONSTRUCTOR_NAME
protected static final java.lang.String DESCRIPTOR_DEFAULT_CONSTRUCTOR
protected static final org.objectweb.asm.commons.Method METHOD_DEFAULT_CONSTRUCTOR
protected static final org.objectweb.asm.Type TYPE_OBJECT
protected static final org.objectweb.asm.Type TYPE_CLASS
protected static final int DEFAULT_MAX_STACK
protected static final org.objectweb.asm.Type TYPE_GENERATED
protected static final java.util.Map<java.lang.String,java.lang.String> NAME_TO_TYPE_MAP
protected final Element originatingElement
protected AbstractClassFileWriter(Element originatingElement)
originatingElement
- The originating elementprotected static void pushTypeArgumentElements(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, TypedElement declaringElement, java.util.Map<java.lang.String,ClassElement> types)
generatorAdapter
- The generator adapterdeclaringElement
- The declaring class element of the genericstypes
- The type referencesprotected static void pushTypeArguments(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, java.util.Map<java.lang.String,java.lang.Object> types)
generatorAdapter
- The generator adaptertypes
- The type referencesprotected static void buildArgument(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, java.lang.String argumentName, java.lang.Object objectType)
generatorAdapter
- The generator adapter.argumentName
- The argument nameobjectType
- The object typeprotected static void pushBuildArgumentsForMethod(org.objectweb.asm.Type owningType, org.objectweb.asm.ClassWriter declaringClassWriter, org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, java.util.Map<java.lang.String,java.lang.Object> argumentTypes, java.util.Map<java.lang.String,AnnotationMetadata> argumentAnnotationMetadata, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> genericTypes, java.util.Map<java.lang.String,org.objectweb.asm.commons.GeneratorAdapter> loadTypeMethods)
owningType
- The owning typedeclaringClassWriter
- The declaring class writergeneratorAdapter
- The GeneratorAdapter
argumentTypes
- The argument typesargumentAnnotationMetadata
- The argument annotation metadatagenericTypes
- The generic typesloadTypeMethods
- The load type methodspublic void writeTo(java.io.File targetDir) throws java.io.IOException
targetDir
- The target directoryjava.io.IOException
- if there is an error writing the file@NotNull protected @NotNull java.util.Map<java.lang.String,java.lang.Object> toTypeArguments(@NotNull @NotNull java.util.Map<java.lang.String,ClassElement> typeArguments)
typeArguments
- The type arguments@NotNull protected @NotNull java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> toTypeArguments(ParameterElement... parameters)
parameters
- The parametesr@NotNull protected @NotNull java.util.Map<java.lang.String,java.lang.Object> toParameterTypes(ParameterElement... parameters)
parameters
- The parametersprotected void writeBooleanMethod(org.objectweb.asm.ClassWriter classWriter, java.lang.String methodName, java.util.function.Supplier<java.lang.Boolean> valueSupplier)
classWriter
- The class writermethodName
- The method namevalueSupplier
- The supplier@Nullable public Element getOriginatingElement()
public abstract void accept(ClassWriterOutputVisitor classWriterOutputVisitor) throws java.io.IOException
classWriterOutputVisitor
- The ClassWriterOutputVisitor
java.io.IOException
- if there is an error writing to diskprotected static java.lang.String getTypeDescriptor(java.lang.Object type)
type
- The typeprotected static org.objectweb.asm.Type getTypeReferenceForName(java.lang.String className, java.lang.String... genericTypes)
className
- The class namegenericTypes
- The generic typesType
protected static org.objectweb.asm.Type getTypeReference(java.lang.Object type)
type
- The typeType
protected static org.objectweb.asm.Type getTypeReference(TypedElement type)
type
- The typeType
protected static void pushBoxPrimitiveIfNecessary(java.lang.Object fieldType, org.objectweb.asm.MethodVisitor injectMethodVisitor)
fieldType
- The field typeinjectMethodVisitor
- The MethodVisitor
protected static void pushCastToType(org.objectweb.asm.MethodVisitor methodVisitor, java.lang.Object type)
methodVisitor
- The MethodVisitor
type
- The typeprotected static void pushReturnValue(org.objectweb.asm.MethodVisitor methodVisitor, java.lang.Object type)
methodVisitor
- The MethodVisitor
type
- The typeprotected static java.lang.Class getWrapperType(java.lang.Object type)
type
- The typeprotected static boolean isPrimitive(java.lang.Object type)
type
- The typeprotected static void pushMethodNameAndTypesArguments(org.objectweb.asm.commons.GeneratorAdapter methodVisitor, java.lang.String methodName, java.util.Collection<java.lang.Object> argumentTypes)
methodVisitor
- The method visitor as GeneratorAdapter
methodName
- The method nameargumentTypes
- The argument typesprotected static void pushNewArray(org.objectweb.asm.commons.GeneratorAdapter methodVisitor, java.lang.Class arrayType, int size)
methodVisitor
- The method visitor as GeneratorAdapter
arrayType
- The array classsize
- The sizeprotected static void pushStoreStringInArray(org.objectweb.asm.commons.GeneratorAdapter methodVisitor, int index, int size, java.lang.String string)
methodVisitor
- The method visitor as GeneratorAdapter
index
- The indexsize
- The sizestring
- The stringprotected static void pushStoreInArray(org.objectweb.asm.commons.GeneratorAdapter methodVisitor, int index, int size, java.lang.Runnable runnable)
methodVisitor
- The method visitor as GeneratorAdapter
index
- The indexsize
- The sizerunnable
- The runnableprotected static void pushStoreTypeInArray(org.objectweb.asm.commons.GeneratorAdapter methodVisitor, int index, int size, java.lang.Object type)
methodVisitor
- The method visitor as GeneratorAdapter
index
- The indexsize
- The sizetype
- The typeprotected org.objectweb.asm.Type[] getObjectTypes(java.util.Collection types)
types
- The typesType
of the objectsprotected static org.objectweb.asm.Type getObjectType(java.lang.Object type)
type
- The typeType
for the object typeprotected static java.lang.String getTypeDescriptor(java.lang.String className, java.lang.String... genericTypes)
className
- The class namegenericTypes
- The generic typesprotected static java.lang.String getMethodDescriptor(java.lang.String returnType, java.lang.String... argumentTypes)
returnType
- The return typeargumentTypes
- The argument typesprotected static java.lang.String getMethodDescriptor(java.lang.Object returnType, java.util.Collection<java.lang.Object> argumentTypes)
returnType
- The return typeargumentTypes
- The argument typesprotected static java.lang.String getMethodSignature(java.lang.String returnTypeReference, java.lang.String... argReferenceTypes)
returnTypeReference
- The return type referenceargReferenceTypes
- The argument reference typesprotected static java.lang.String getConstructorDescriptor(java.lang.Object... argumentTypes)
argumentTypes
- The argument typesprotected static java.lang.String getConstructorDescriptor(java.util.Collection<java.lang.Object> argList)
argList
- The argument listprotected void writeClassToDisk(java.io.File targetDir, org.objectweb.asm.ClassWriter classWriter, java.lang.String className) throws java.io.IOException
targetDir
- The target directoryclassWriter
- The current class writerclassName
- The class namejava.io.IOException
- if there is a problem writing the class to diskprotected void writeClassToDisk(java.io.OutputStream out, org.objectweb.asm.ClassWriter classWriter) throws java.io.IOException
out
- The output streamclassWriter
- The current class writerjava.io.IOException
- if there is a problem writing the class to diskprotected org.objectweb.asm.commons.GeneratorAdapter startConstructor(org.objectweb.asm.ClassVisitor classWriter)
classWriter
- The current class writerGeneratorAdapter
for the constructorprotected org.objectweb.asm.commons.GeneratorAdapter startConstructor(org.objectweb.asm.ClassVisitor classWriter, java.lang.Object... argumentTypes)
classWriter
- The current class writerargumentTypes
- The argument typesGeneratorAdapter
for the constructorprotected void startClass(org.objectweb.asm.ClassVisitor classWriter, java.lang.String className, org.objectweb.asm.Type superType)
classWriter
- The current class writerclassName
- The class namesuperType
- The super typeprotected void startPublicClass(org.objectweb.asm.ClassVisitor classWriter, java.lang.String className, org.objectweb.asm.Type superType)
classWriter
- The current class writerclassName
- The class namesuperType
- The super typeprotected void startService(org.objectweb.asm.ClassVisitor classWriter, java.lang.Class<?> serviceType, java.lang.String internalClassName, org.objectweb.asm.Type superType)
classWriter
- The current class writerserviceType
- The service typeinternalClassName
- The class namesuperType
- The super typeprotected void startService(org.objectweb.asm.ClassVisitor classWriter, java.lang.String serviceName, java.lang.String internalClassName, org.objectweb.asm.Type superType)
classWriter
- The current class writerserviceName
- The service nameinternalClassName
- The class namesuperType
- The super typeprotected void startFinalClass(org.objectweb.asm.ClassVisitor classWriter, java.lang.String className, org.objectweb.asm.Type superType)
classWriter
- The current class writerclassName
- The class namesuperType
- The super typeprotected void startPublicFinalClass(org.objectweb.asm.ClassVisitor classWriter, java.lang.String className, org.objectweb.asm.Type superType)
classWriter
- The current class writerclassName
- The class namesuperType
- The super typeprotected void startClass(org.objectweb.asm.ClassWriter classWriter, java.lang.String className, org.objectweb.asm.Type superType, java.lang.String genericSignature)
classWriter
- The current class writerclassName
- The class namesuperType
- The super typegenericSignature
- The generic signatureprotected void invokeConstructor(org.objectweb.asm.MethodVisitor cv, java.lang.Class superClass, java.lang.Class... argumentTypes)
cv
- The constructor visitorsuperClass
- The super classargumentTypes
- The argument typesprotected static void invokeInterfaceStaticMethod(org.objectweb.asm.MethodVisitor visitor, java.lang.Class targetType, org.objectweb.asm.commons.Method method)
visitor
- The interface visitortargetType
- The target typemethod
- The methodprotected org.objectweb.asm.commons.GeneratorAdapter startPublicMethodZeroArgs(org.objectweb.asm.ClassWriter classWriter, java.lang.Class returnType, java.lang.String methodName)
classWriter
- The current class writerreturnType
- The return typemethodName
- The method nameGeneratorAdapter
for the methodprotected org.objectweb.asm.commons.GeneratorAdapter startPublicFinalMethodZeroArgs(org.objectweb.asm.ClassWriter classWriter, java.lang.Class returnType, java.lang.String methodName)
classWriter
- The current class writerreturnType
- The return typemethodName
- The method nameGeneratorAdapter
for the methodprotected static java.lang.String getInternalName(java.lang.String className)
className
- The class nameprotected static java.lang.String getInternalNameForCast(java.lang.Object type)
type
- The typeprotected java.lang.String getClassFileName(java.lang.String className)
className
- The class nameprotected ClassWriterOutputVisitor newClassWriterOutputVisitor(java.io.File compilationDir)
compilationDir
- The compilation directoryprotected void returnVoid(org.objectweb.asm.commons.GeneratorAdapter overriddenMethodGenerator)
overriddenMethodGenerator
- The overriden method generatorprotected org.objectweb.asm.commons.GeneratorAdapter visitStaticInitializer(org.objectweb.asm.ClassVisitor classWriter)
classWriter
- The current class writerGeneratorAdapter
protected org.objectweb.asm.commons.GeneratorAdapter startPublicMethod(org.objectweb.asm.ClassWriter writer, java.lang.String methodName, java.lang.String returnType, java.lang.String... argumentTypes)
writer
- The class writermethodName
- The method namereturnType
- The return typeargumentTypes
- The argument typesGeneratorAdapter
protected org.objectweb.asm.commons.GeneratorAdapter startProtectedMethod(org.objectweb.asm.ClassWriter writer, java.lang.String methodName, java.lang.String returnType, java.lang.String... argumentTypes)
writer
- The class writermethodName
- The method namereturnType
- The return typeargumentTypes
- The argument typesGeneratorAdapter
protected void generateServiceDescriptor(java.lang.String className, GeneratedFile generatedFile) throws java.io.IOException
className
- The class namegeneratedFile
- The generated filejava.io.IOException
- An exception if an error occursprotected void pushNewInstance(org.objectweb.asm.commons.GeneratorAdapter generatorAdapter, org.objectweb.asm.Type typeToInstantiate)
generatorAdapter
- The generator adaptortypeToInstantiate
- The type to instantiate.