Top Description Inners Fields Constructors Methods
org.python.expose.generate

public abstract Class ExposedMethodFinder

extends MethodVisitor
implements PyTypes, Opcodes
Class Inheritance
All Implemented Interfaces
org.objectweb.asm.Opcodes, org.python.expose.generate.PyTypes
Imports
java.util.List, org.python.expose.MethodType, org.objectweb.asm.AnnotationVisitor, .MethodVisitor, .Opcodes, .Type, org.python.util.Generic

Visits a method passing all calls through to its delegate. If an ExposedNew or ExposedMethod annotation is visited, calls handleResult with the exposer constructed with that annotation. Only one of the handleResult methods will be called, if any.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
private abstract class

Field Summary

Modifier and TypeField and Description
private int
private ExposedMethodFinder.ExposedMethodVisitor
private String[]
private String
private String
private ExposedMethodFinder.ExposedMethodVisitor
private Exposer
private Type
private String
Inherited from org.objectweb.asm.MethodVisitor:
apimv

Constructor Summary

AccessConstructor and Description
public
ExposedMethodFinder(String typeName, Type onType, int access, String name, String desc, String[] exceptions, MethodVisitor delegate)

Method Summary

Modifier and TypeMethod and Description
public abstract void
public abstract void
public abstract void
public abstract void
handleNewExposer(Exposer
- the newExposer built as a result of visiting ExposeNew
exposer
)

public abstract void
handleResult(InstanceMethodExposer
- the InstanceMethodExposer built as a result of visiting ExposeMethod
exposer
)

public abstract void
handleResult(ClassMethodExposer
- the ClassMethodExposer built as a result of visiting ExposeClassMethod
exposer
)

public AnnotationVisitor
visitAnnotation(String
the class descriptor of the annotation class.
desc
,
boolean
true if the annotation is visible at runtime.
visible
)

Overrides org.objectweb.asm.MethodVisitor.visitAnnotation.

Visits an annotation of this method.

public void
visitEnd()

Overrides org.objectweb.asm.MethodVisitor.visitEnd.

Visits the end of the method.

Inherited from org.objectweb.asm.MethodVisitor:
getDelegatevisitAnnotableParameterCountvisitAnnotationDefaultvisitAttributevisitCodevisitFieldInsnvisitFramevisitIincInsnvisitInsnvisitInsnAnnotationvisitIntInsnvisitInvokeDynamicInsnvisitJumpInsnvisitLabelvisitLdcInsnvisitLineNumbervisitLocalVariablevisitLocalVariableAnnotationvisitLookupSwitchInsnvisitMaxsvisitMethodInsnvisitMethodInsnvisitMultiANewArrayInsnvisitParametervisitParameterAnnotationvisitTableSwitchInsnvisitTryCatchAnnotationvisitTryCatchBlockvisitTypeAnnotationvisitTypeInsnvisitVarInsn

Field Detail

accessback to summary
private int access
classMethVisitorback to summary
private ExposedMethodFinder.ExposedMethodVisitor classMethVisitor
exceptionsback to summary
private String[] exceptions
methodDescback to summary
private String methodDesc
methodNameback to summary
private String methodName
methVisitorback to summary
private ExposedMethodFinder.ExposedMethodVisitor methVisitor
newExpback to summary
private Exposer newExp
onTypeback to summary
private Type onType
typeNameback to summary
private String typeName

Constructor Detail

ExposedMethodFinderback to summary
public ExposedMethodFinder(String typeName, Type onType, int access, String name, String desc, String[] exceptions, MethodVisitor delegate)

Method Detail

exposeAsDeleteDescriptorback to summary
public abstract void exposeAsDeleteDescriptor(String descName)
exposeAsGetDescriptorback to summary
public abstract void exposeAsGetDescriptor(String descName, String doc)
exposeAsSetDescriptorback to summary
public abstract void exposeAsSetDescriptor(String descName)
handleNewExposerback to summary
public abstract void handleNewExposer(Exposer exposer)
Parameters
exposer:Exposer

- the newExposer built as a result of visiting ExposeNew

handleResultback to summary
public abstract void handleResult(InstanceMethodExposer exposer)
Parameters
exposer:InstanceMethodExposer

- the InstanceMethodExposer built as a result of visiting ExposeMethod

handleResultback to summary
public abstract void handleResult(ClassMethodExposer exposer)
Parameters
exposer:ClassMethodExposer

- the ClassMethodExposer built as a result of visiting ExposeClassMethod

visitAnnotationback to summary
public AnnotationVisitor visitAnnotation(String desc, boolean visible)

Overrides org.objectweb.asm.MethodVisitor.visitAnnotation.

Doc from org.objectweb.asm.MethodVisitor.visitAnnotation.

Visits an annotation of this method.

Parameters
desc:String

the class descriptor of the annotation class.

visible:boolean

true if the annotation is visible at runtime.

Returns:AnnotationVisitor

a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation.

Annotations
@Override

visitEndback to summary
public void visitEnd()

Overrides org.objectweb.asm.MethodVisitor.visitEnd.

Doc from org.objectweb.asm.MethodVisitor.visitEnd.

Visits the end of the method. This method, which is the last one to be called, is used to inform the visitor that all the annotations and attributes of the method have been visited.

Annotations
@Override
org.python.expose.generate back to summary

pack-priv Class ExposedMethodFinder.ExposedMethodVisitor

extends RestrictiveAnnotationVisitor
Class Inheritance

Field Summary

Modifier and TypeField and Description
private String[]
private String
private String[]
private MethodType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
visit(String
the value name.
name
,
Object
the actual value, whose type must be Byte, Boolean, Character, Short, Integer , Long, Float, Double, String or Type of Type#OBJECT or Type#ARRAY sort. This value can also be an array of byte, boolean, short, char, int, long, float or double values (this is equivalent to using visitArray and visiting each array element in turn, but is more convenient).
value
)

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visit.

Visits a primitive value of the annotation.

public AnnotationVisitor
visitArray(String
the value name.
name
)

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visitArray.

Visits an array value of the annotation.

public void
visitEnum(String
the value name.
name
,
String
the class descriptor of the enumeration class.
desc
,
String
the actual enumeration value.
value
)

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visitEnum.

Visits an enumeration value of the annotation.

Inherited from org.python.expose.generate.RestrictiveAnnotationVisitor:
visitAnnotationvisitEnd

Field Detail

defaultsback to summary
private String[] defaults
docback to summary
private String doc
namesback to summary
private String[] names
typeback to summary
private MethodType type

Constructor Detail

ExposedMethodVisitorback to summary
public ExposedMethodVisitor()

Method Detail

visitback to summary
public void visit(String name, Object value)

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visit.

Doc from org.objectweb.asm.AnnotationVisitor.visit.

Visits a primitive value of the annotation.

Parameters
name:String

the value name.

value:Object

the actual value, whose type must be Byte, Boolean, Character, Short, Integer , Long, Float, Double, String or Type of Type#OBJECT or Type#ARRAY sort. This value can also be an array of byte, boolean, short, char, int, long, float or double values (this is equivalent to using visitArray and visiting each array element in turn, but is more convenient).

Annotations
@Override
visitArrayback to summary
public AnnotationVisitor visitArray(String name)

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visitArray.

Doc from org.objectweb.asm.AnnotationVisitor.visitArray.

Visits an array value of the annotation. Note that arrays of primitive values (such as byte, boolean, short, char, int, long, float or double) can be passed as value to visit. This is what ClassReader does for non empty arrays of primitive values.

Parameters
name:String

the value name.

Returns:AnnotationVisitor

a visitor to visit the actual array value elements, or null if this visitor is not interested in visiting these values. The 'name' parameters passed to the methods of this visitor are ignored. All the array values must be visited before calling other methods on this annotation visitor.

Annotations
@Override

visitEnumback to summary
public void visitEnum(String name, String desc, String value)

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visitEnum.

Doc from org.objectweb.asm.AnnotationVisitor.visitEnum.

Visits an enumeration value of the annotation.

Parameters
name:String

the value name.

desc:String

the class descriptor of the enumeration class.

value:String

the actual enumeration value.

Annotations
@Override
org.python.expose.generate back to summary

private abstract Class ExposedMethodFinder.StringArrayBuilder

extends RestrictiveAnnotationVisitor
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv List<String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public abstract void
handleResult(String[] result)

public void
visit(String
the value name.
name
,
Object
the actual value, whose type must be Byte, Boolean, Character, Short, Integer , Long, Float, Double, String or Type of Type#OBJECT or Type#ARRAY sort. This value can also be an array of byte, boolean, short, char, int, long, float or double values (this is equivalent to using visitArray and visiting each array element in turn, but is more convenient).
value
)

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visit.

Visits a primitive value of the annotation.

public void
visitEnd()

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visitEnd.

Visits the end of the annotation.

Inherited from org.python.expose.generate.RestrictiveAnnotationVisitor:
visitAnnotationvisitArrayvisitEnum

Field Detail

valsback to summary
pack-priv List<String> vals

Constructor Detail

StringArrayBuilderback to summary
private StringArrayBuilder()

Method Detail

handleResultback to summary
public abstract void handleResult(String[] result)
visitback to summary
public void visit(String name, Object value)

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visit.

Doc from org.objectweb.asm.AnnotationVisitor.visit.

Visits a primitive value of the annotation.

Parameters
name:String

the value name.

value:Object

the actual value, whose type must be Byte, Boolean, Character, Short, Integer , Long, Float, Double, String or Type of Type#OBJECT or Type#ARRAY sort. This value can also be an array of byte, boolean, short, char, int, long, float or double values (this is equivalent to using visitArray and visiting each array element in turn, but is more convenient).

Annotations
@Override
visitEndback to summary
public void visitEnd()

Overrides org.python.expose.generate.RestrictiveAnnotationVisitor.visitEnd.

Doc from org.objectweb.asm.AnnotationVisitor.visitEnd.

Visits the end of the annotation.

Annotations
@Override