| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| protected ClassVisitor | cv
The current class under construction. |
| protected Type[] | |
| protected MethodVisitor | mv
The current method under construction or null. |
| protected static final Map | PRIMITIVES
Maps from a primitive type to its wrapper |
| private Type | superType
The super class of the type that will be generated. |
| protected Type | thisType
The type that will be generated. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| protected void | callStatic(Type onType, String methodName, Type returnType, Type... args)
Calls the static method on onType with the given return type and argument types. |
| protected void | |
| protected void | |
| protected abstract void | |
| public void | |
| protected void | |
| public String | |
| protected Type | |
| public String | |
| protected void | |
| protected void | |
| protected void | instantiate(Type ofType, Exposer.
Instantiates ofType with its constructor that takes the types returned by inst.getTypes(). |
| protected Class | |
| protected String | methodDesc(Type ret, Type... args)
Produces a method descriptor with ret as its return type that takes args. |
| protected void | |
| protected void | startMethod(String name, Type ret, Type... args)
Starts building a method in the class being generated. |
| protected void | |
| protected void |
| cv | back to summary |
|---|---|
| protected ClassVisitor cv The current class under construction. | |
| interfacesImplemented | back to summary |
|---|---|
| protected Type[] interfacesImplemented | |
| mv | back to summary |
|---|---|
| protected MethodVisitor mv The current method under construction or null. | |
| PRIMITIVES | back to summary |
|---|---|
| protected static final Map<Type, Type> PRIMITIVES Maps from a primitive type to its wrapper | |
| superType | back to summary |
|---|---|
| private Type superType The super class of the type that will be generated. | |
| thisType | back to summary |
|---|---|
| protected Type thisType The type that will be generated. | |
| Exposer | back to summary |
|---|---|
| public Exposer(Class<?> superClass, String generatedName, Type... interfacesImplemented) | |
| call | back to summary |
|---|---|
| protected void call(Type onType, String methodName, Type returnType, Type... args) Calls the method on onType with the given return type and argument types. | |
| callConstructor | back to summary |
|---|---|
| protected void callConstructor(Type onType, Type... args) Calls the constructor on onType with the given args. | |
| callStatic | back to summary |
|---|---|
| protected void callStatic(Type onType, String methodName, Type returnType, Type... args) Calls the static method on onType with the given return type and argument types. | |
| endConstructor | back to summary |
|---|---|
| protected void endConstructor() Closes the constructor begun by startConstructor. | |
| endMethod | back to summary |
|---|---|
| protected void endMethod(int returnCode) Closes the method under construction. | |
| generate | back to summary |
|---|---|
| protected abstract void generate() Implemented by subclasses to fill in the actual implementation of the class. cv is set to the ClassVisitor to be used when this is called. | |
| generate | back to summary |
|---|---|
| public void generate(ClassVisitor visitor) Will call the methods on visitor to generate this class. Only one call to generate may be active at a time on a single instance of Exposer. The ClassVisitor is assumed to have been constructed with COMPUTE_FRAMES. | |
| get | back to summary |
|---|---|
| protected void get(String fieldName, Type ofType) Loads a field on the instance under construction of ofType onto the stack | |
| getClassName | back to summary |
|---|---|
| public String getClassName() | |
| getGeneratedType | back to summary |
|---|---|
| protected Type getGeneratedType() | |
| getInternalName | back to summary |
|---|---|
| public String getInternalName() | |
| getStatic | back to summary |
|---|---|
| protected void getStatic(Type onType, String fieldName, Type ofType) Gets a static field from onType of the given type. | |
| instantiate | back to summary |
|---|---|
| protected void instantiate(Type ofType) Instantiates ofType using its no-arg constructor | |
| instantiate | back to summary |
|---|---|
| protected void instantiate(Type ofType, Exposer. Instantiates ofType with its constructor that takes the types returned by inst.getTypes(). inst should override pushArgs to put arguments of those types on the stack for the call. | |
| load | back to summary |
|---|---|
| protected Class Generates this Exposer and loads it into the given Loader. | |
| methodDesc | back to summary |
|---|---|
| protected String methodDesc(Type ret, Type... args) Produces a method descriptor with ret as its return type that takes args. | |
| startConstructor | back to summary |
|---|---|
| protected void startConstructor(Type... args) Starts building a constructor in the class. Must be followed by a call to endConstructor before startConstructor or startMethod may be called. | |
| startMethod | back to summary |
|---|---|
| protected void startMethod(String name, Type ret, Type... args) Starts building a method in the class being generated. Must be followed by a call to endMethod before startMethod or startConstructor may be called. | |
| superConstructor | back to summary |
|---|---|
| protected void superConstructor(Type... args) Calls the constructor on the super class with the given args. | |
| toPy | back to summary |
|---|---|
| protected void toPy(Type inputType) Turns an object of inputType on the top of the stack into an equivalent Py type. Handles primitives, void, and String. If void, the top item on the stack isn't touched. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Type[] | |
| public void |
| types | back to summary |
|---|---|
| private Type[] types | |
| Instantiator | back to summary |
|---|---|
| public Instantiator(Type... types) | |
| getTypes | back to summary |
|---|---|
| public Type[] getTypes() | |
| pushArgs | back to summary |
|---|---|
| public void pushArgs() Push args onto the stack corresponding to the types passed to the constructor. | |