Package com.strobel.reflection.emit
Class ClassWriter
java.lang.Object
com.strobel.reflection.emit.ClassWriter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CodeStream
private final CodeStream
private final CodeStream
private final TypeBuilder
<?> private static final int
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
private void
endAttribute
(int index) private void
endAttributes
(int index, int count) private RetentionPolicy
getAnnotationRetention
(AnnotationBuilder<? extends Annotation> a) private List
<ClassWriter.LocalInfo> getLocalInfo
(MethodBuilder builder) private boolean
needsLocalVariableTableEntry
(Type<?> localType) (package private) void
putChar
(CodeStream buf, int op, int x) (package private) void
putInt
(CodeStream buf, int adr, int x) private void
writeAnnotation
(AnnotationBuilder<? extends Annotation> a) private int
writeAttribute
(String attributeName) private void
writeAttributeType
(Object value) private void
writeBody
(MethodBuilder method) void
writeClass
(CodeStream out) void
writeClass
(OutputStream out) private void
private int
private void
writeField
(FieldBuilder field) private void
private int
writeFlagAttributes
(long flags) private void
writeInnerTypeInfo
(Type<?> type) private int
private int
writeJavaAnnotations
(ReadOnlyList<AnnotationBuilder<? extends Annotation>> annotations) private int
writeMemberAttributes
(MemberInfo member) private void
writeMethod
(MethodBuilder method) private void
private int
-
Field Details
-
JAVA_MAGIC
private static final int JAVA_MAGIC- See Also:
-
DATA_BUFFER_SIZE
private static final int DATA_BUFFER_SIZE- See Also:
-
POOL_BUFFER_SIZE
private static final int POOL_BUFFER_SIZE- See Also:
-
_dataBuffer
-
_poolBuffer
-
_signatureBuffer
-
_typeBuilder
-
-
Constructor Details
-
ClassWriter
ClassWriter(TypeBuilder<?> typeBuilder)
-
-
Method Details
-
writeClass
- Throws:
IOException
-
writeClass
- Throws:
IOException
-
writeCore
private void writeCore() -
writeEnclosingMethodAttribute
-
writeInnerTypes
private int writeInnerTypes() -
writeInnerTypeInfo
-
writeFields
private void writeFields() -
writeField
-
writeMethods
private void writeMethods() -
writeMethod
-
writeBody
-
needsLocalVariableTableEntry
-
getLocalInfo
-
writeMemberAttributes
-
writeParameterAttributes
-
getAnnotationRetention
-
writeJavaAnnotations
-
writeAnnotation
-
writeAttributeType
-
writeAttribute
-
beginAttributes
private int beginAttributes() -
endAttributes
private void endAttributes(int index, int count) -
endAttribute
private void endAttribute(int index) -
writeFlagAttributes
private int writeFlagAttributes(long flags) -
putChar
-
putInt
-