ExposedType annotation on it and
generates new bytecode for it containing the inner classes Jython needs to expose it as a type.
| Modifier and Type | Class and Description |
|---|---|
| private class | ExposedTypeProcessor.
The actual visitor that runs over the bytecode and figures out what to expose. |
| Modifier and Type | Field and Description |
|---|---|
| private ClassWriter | |
| private Map | |
| private List | |
| private Exposer | |
| private Type | |
| private TypeExposer | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | |
| protected DescriptorExposer | |
| public Collection | |
| public String | |
| public Collection | |
| public String | |
| public Exposer | Returns: The Exposer for __new__ for this type. Can be null if the type isn't instantiable.
|
| public TypeExposer |
| cw | back to summary |
|---|---|
| private ClassWriter cw | |
| descExposers | back to summary |
|---|---|
| private Map<String, DescriptorExposer> descExposers | |
| methodExposers | back to summary |
|---|---|
| private List<MethodExposer> methodExposers | |
| newExposer | back to summary |
|---|---|
| private Exposer newExposer | |
| onType | back to summary |
|---|---|
| private Type onType | |
| typeExposer | back to summary |
|---|---|
| private TypeExposer typeExposer | |
| typeName | back to summary |
|---|---|
| private String typeName | |
| ExposedTypeProcessor | back to summary |
|---|---|
public ExposedTypeProcessor(InputStream in) throws IOException
| |
| getBytecode | back to summary |
|---|---|
public byte[] getBytecode()
| |
| getDescriptorExposer | back to summary |
|---|---|
| protected DescriptorExposer getDescriptorExposer(String descName) | |
| getDescriptorExposers | back to summary |
|---|---|
| public Collection | |
| getExposedClassName | back to summary |
|---|---|
public String getExposedClassName()
| |
| getMethodExposers | back to summary |
|---|---|
public Collection
| |
| getName | back to summary |
|---|---|
public String getName()
| |
| getNewExposer | back to summary |
|---|---|
public Exposer getNewExposer()
| |
| getTypeExposer | back to summary |
|---|---|
| public TypeExposer getTypeExposer() | |
| Modifier and Type | Field and Description |
|---|---|
| private Type | |
| private String | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| public void | visit(int
the class version. The minor version is stored in the 16 most significant bits,
and the major version in the 16 least significant bits. version, int the class's access flags (see access, String Opcodes). This parameter also indicates if
the class is deprecated Opcodes#ACC_DEPRECATED or a record Opcodes#ACC_RECORD.the internal name of the class (see name, String Type#getInternalName()).the signature of this class. May be null if the class is not a
generic one, and does not extend or implement generic classes or interfaces. signature, String the internal of name of the super class (see superName, String[] Type#getInternalName()).
For interfaces, the super class is Object. May be null, but only for the
Object class.the internal names of the class's interfaces (see interfaces)Type#getInternalName()). May be null.Overrides org. Visits the header of the class. |
| public AnnotationVisitor | visitAnnotation(String
the class descriptor of the annotation class. desc, boolean true if the annotation is visible at runtime. visible)Overrides org. Visits an annotation of the class. |
| public void | |
| public FieldVisitor | visitField(int
the field's access flags (see access, final String Opcodes). This parameter also indicates if
the field is synthetic and/or deprecated.the field's name. fieldName, final String the field's descriptor (see desc, String Type).the field's signature. May be null if the field's type does not use
generic types. signature, Object the field's initial value. This parameter, which may be null if the
field does not have an initial value, must be an value)Integer, a Float, a Long, a Double or a String (for int, float, long
or String fields respectively). This parameter is only used for static
fields. Its value is ignored for non static fields, which must be initialized through
bytecode instructions in constructors or methods.Overrides org. Visits a field of the class. |
| public MethodVisitor | visitMethod(int
the method's access flags (see access, final String Opcodes). This parameter also indicates if
the method is synthetic and/or deprecated.the method's name. name, final String the method's descriptor (see desc, String Type).the method's signature. May be null if the method parameters,
return type and exceptions do not use generic types. signature, String[] the internal names of the method's exception classes (see exceptions)Type#getInternalName()). May be null.Overrides org. Visits a method of the class. |
| baseType | back to summary |
|---|---|
| private Type baseType | |
| doc | back to summary |
|---|---|
| private String doc | |
| generatedStaticBlock | back to summary |
|---|---|
| private boolean generatedStaticBlock | |
| isBaseType | back to summary |
|---|---|
| private boolean isBaseType | |
| TypeProcessor | back to summary |
|---|---|
| private TypeProcessor(ClassVisitor cv) | |
| addInnerClass | back to summary |
|---|---|
| private void addInnerClass(Type inner) Adds an inner class reference to inner from the class being visited. | |
| generateAddBuilder | back to summary |
|---|---|
| private void generateAddBuilder(MethodVisitor mv) | |
| throwInvalid | back to summary |
|---|---|
| private void throwInvalid(String msg) | |
| visit | back to summary |
|---|---|
| public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) Overrides org. Doc from org. Visits the header of the class.
| |
| visitAnnotation | back to summary |
|---|---|
| public AnnotationVisitor visitAnnotation(String desc, boolean visible) Overrides org. Doc from org. Visits an annotation of the class.
a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation. | |
| visitEnd | back to summary |
|---|---|
| public void visitEnd() Overrides org. Doc from org. Visits the end of the class. This method, which is the last one to be called, is used to inform the visitor that all the fields and methods of the class have been visited.
| |
| visitField | back to summary |
|---|---|
| public FieldVisitor visitField(int access, final String fieldName, final String desc, String signature, Object value) Overrides org. Doc from org. Visits a field of the class.
a visitor to visit field annotations and attributes, or null if this class visitor is not interested in visiting these annotations and attributes. | |
| visitMethod | back to summary |
|---|---|
| public MethodVisitor visitMethod(int access, final String name, final String desc, String signature, String[] exceptions) Overrides org. Doc from org. Visits a method of the class. This method must return a new
an object to visit the byte code of the method, or null if this class visitor is not interested in visiting the code of this method. | |