|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.python.objectweb.asm.commons.EmptyVisitor
org.python.core.APIReader
public class APIReader
This class reads a classfile from a byte array and pulls out the value of the class annotation for APIVersion, which can then be retrieved by a call to getVersion(). Hopefully the use of ClassReader in this implementation is not too expensive. I suspect it is not since EmptyVisitor is just a bag of empty methods so shouldn't cost too much. If it turns out to cost too much, we will want to implement a special purpose ClassReader that only reads out the APIVersion annotation I think.
| Constructor Summary | |
|---|---|
APIReader(byte[] data)
|
|
| Method Summary | |
|---|---|
int |
getVersion()
|
void |
visit(java.lang.String name,
java.lang.Object value)
|
org.python.objectweb.asm.AnnotationVisitor |
visitAnnotation(java.lang.String desc,
boolean visible)
|
| Methods inherited from class org.python.objectweb.asm.commons.EmptyVisitor |
|---|
visit, visitAnnotation, visitAnnotationDefault, visitArray, visitAttribute, visitCode, visitEnd, visitEnum, visitField, visitFieldInsn, visitFrame, visitIincInsn, visitInnerClass, visitInsn, visitIntInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLookupSwitchInsn, visitMaxs, visitMethod, visitMethodInsn, visitMultiANewArrayInsn, visitOuterClass, visitParameterAnnotation, visitSource, visitTableSwitchInsn, visitTryCatchBlock, visitTypeInsn, visitVarInsn |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public APIReader(byte[] data)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public org.python.objectweb.asm.AnnotationVisitor visitAnnotation(java.lang.String desc,
boolean visible)
visitAnnotation in interface org.python.objectweb.asm.ClassVisitorvisitAnnotation in interface org.python.objectweb.asm.FieldVisitorvisitAnnotation in interface org.python.objectweb.asm.MethodVisitorvisitAnnotation in class org.python.objectweb.asm.commons.EmptyVisitor
public void visit(java.lang.String name,
java.lang.Object value)
visit in interface org.python.objectweb.asm.AnnotationVisitorvisit in class org.python.objectweb.asm.commons.EmptyVisitorpublic int getVersion()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||