Package eu.bandm.tools.util.classes
Class ClassFileVisitor<D>
java.lang.Object
eu.bandm.tools.util.classes.ClassFileVisitor<D>
- Type Parameters:
D
- the type of class file document identifiers
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
AnnotationVisitor
Abstract algorithm for traversing a class file.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
attribute
(int index, int nameIndex, long length) protected void
constantClass
(int index, int nameIndex) protected void
constantDouble
(int index, double value) protected void
constantFieldref
(int index, int classIndex, int nameAndTypeIndex) protected void
constantFloat
(int index, float value) protected void
constantInteger
(int index, int value) protected void
constantInterfaceMethodref
(int index, int classIndex, int nameAndTypeIndex) protected void
constantInvokeDynamic
(int index, int bootstrapMethodAttrIndex, int nameAndTypeIndex) protected void
constantLong
(int index, long value) protected void
constantMethodHandle
(int index, int referenceKind, int referenceIndex) protected void
constantMethodref
(int index, int classIndex, int nameAndTypeIndex) protected void
constantMethodType
(int index, int descriptorIndex) protected void
constantModule
(int index, int nameIndex) protected void
constantNameAndType
(int index, int nameIndex, int descriptorIndex) protected void
constantPackage
(int index, int nameIndex) protected void
constantString
(int index, int stringIndex) protected void
constantUtf8
(int index, String text) protected void
constantValue
(int index, int valueIndex) protected void
elementValueBoolean
(int valueIndex) protected void
elementValueByte
(int valueIndex) protected void
elementValueChar
(int valueIndex) protected void
elementValueClass
(int typeIndex) protected void
elementValueDouble
(int valueIndex) protected void
elementValueEnum
(int typeIndex, int valueIndex) protected void
elementValueFloat
(int valueIndex) protected void
elementValueInt
(int valueIndex) protected void
elementValueLong
(int valueIndex) protected void
elementValueShort
(int valueIndex) protected void
elementValueString
(int valueIndex) protected void
protected void
protected void
endClass()
protected void
protected void
endCode()
protected void
protected void
protected void
protected void
protected void
protected void
endField()
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
exceptionHandler
(int startPC, int endPC, int handlerPC, int catchType) protected void
exceptions
(int index, int... exceptionIndexTable) protected String
getUTF8
(int index) protected void
innerClass
(int index, int innerClassIndex, int outerClassIndex, int innerNameIndex, int innerClassAccessFlags) protected void
lineNumber
(int index, int startPC, int lineNumber) protected void
receiveError
(D docid, String text, Object... args) Hook method must be overridden by any user.void
run()
protected void
sourceFile
(int index, int sourceFileIndex) protected void
startAnnotation
(int typeIndex, int length) protected void
startAttributes
(int length) protected void
startClass
(int accessFlags, int thisClass, int superClass, int... interfaces) protected void
startClassFile
(int major, int minor) protected void
startCode
(int index, int maxStack, int maxLocals, byte... code) protected void
startConstantPool
(int length) protected void
protected void
startElementValueArray
(int length) protected void
startElementValuePair
(int index, int nameIndex) protected void
startExceptionHandlers
(int length) protected void
startField
(int index, int accessFlags, int nameIndex, int descriptorIndex) protected void
startFields
(int length) protected void
startInnerClasses
(int index, int length) protected void
startLineNumberTable
(int index, int length) protected void
startMethod
(int index, int accessFlags, int nameIndex, int descriptorIndex) protected void
startMethods
(int length) protected void
protected void
protected void
protected void
visitAttribute
(int index) protected void
protected void
protected void
protected void
visitCodeAttribute
(int index) protected void
visitConstantClass
(int index) protected void
visitConstantDouble
(int index) protected void
visitConstantFieldref
(int index) protected void
visitConstantFloat
(int index) protected void
visitConstantInteger
(int index) protected void
visitConstantInterfaceMethodref
(int index) protected void
visitConstantInvokeDynamic
(int index) protected void
visitConstantLong
(int index) protected void
visitConstantMethodHandle
(int index) protected void
visitConstantMethodref
(int index) protected void
visitConstantMethodType
(int index) protected void
visitConstantModule
(int index) protected void
visitConstantNameAndType
(int index) protected void
visitConstantPackage
(int index) protected void
protected boolean
visitConstantPoolEntry
(int index) protected void
visitConstantString
(int index) protected void
visitConstantUtf8
(int index) protected void
visitConstantValueAttribute
(int index) protected void
protected void
visitElementValuePair
(int i) protected void
visitExceptionsAttribute
(int index) protected void
protected void
visitField
(int index) protected void
protected void
visitInnerClassesAttribute
(int index) protected int[]
protected void
visitLineNumberTableAttribute
(int index) protected void
visitMethod
(int index) protected void
protected void
visitRuntimeInvisibleAnnotationsAttribute
(int index) protected void
visitRuntimeVisibleAnnotationsAttribute
(int index) protected void
visitSourceFileAttribute
(int index)
-
Field Details
-
MAX_MAJOR
public static final int MAX_MAJOR- See Also:
-
MAX_MINOR
public static final int MAX_MINOR- See Also:
-
-
Constructor Details
-
ClassFileVisitor
-
-
Method Details
-
run
public void run() -
getUTF8
-
receiveError
Hook method must be overridden by any user.- Parameters:
docid
- the identifier of the read class filetext
- error textargs
- error text arguments
-
error
-
visitClassFile
protected void visitClassFile() -
visitConstantPool
protected void visitConstantPool() -
visitConstantPoolEntry
protected boolean visitConstantPoolEntry(int index) -
visitConstantUtf8
protected void visitConstantUtf8(int index) -
visitConstantInteger
protected void visitConstantInteger(int index) -
visitConstantFloat
protected void visitConstantFloat(int index) -
visitConstantLong
protected void visitConstantLong(int index) -
visitConstantDouble
protected void visitConstantDouble(int index) -
visitConstantClass
protected void visitConstantClass(int index) -
visitConstantString
protected void visitConstantString(int index) -
visitConstantFieldref
protected void visitConstantFieldref(int index) -
visitConstantMethodref
protected void visitConstantMethodref(int index) -
visitConstantInterfaceMethodref
protected void visitConstantInterfaceMethodref(int index) -
visitConstantNameAndType
protected void visitConstantNameAndType(int index) -
visitConstantMethodHandle
protected void visitConstantMethodHandle(int index) -
visitConstantMethodType
protected void visitConstantMethodType(int index) -
visitConstantInvokeDynamic
protected void visitConstantInvokeDynamic(int index) -
visitConstantModule
protected void visitConstantModule(int index) -
visitConstantPackage
protected void visitConstantPackage(int index) -
visitClass
protected void visitClass() -
visitInterfaces
protected int[] visitInterfaces() -
visitFields
protected void visitFields() -
visitField
protected void visitField(int index) -
visitMethods
protected void visitMethods() -
visitMethod
protected void visitMethod(int index) -
visitAttributes
protected void visitAttributes() -
visitAttribute
protected void visitAttribute(int index) -
visitConstantValueAttribute
protected void visitConstantValueAttribute(int index) -
visitCodeAttribute
protected void visitCodeAttribute(int index) -
visitExceptionTable
protected void visitExceptionTable() -
visitExceptionsAttribute
protected void visitExceptionsAttribute(int index) -
visitInnerClassesAttribute
protected void visitInnerClassesAttribute(int index) -
visitSourceFileAttribute
protected void visitSourceFileAttribute(int index) -
visitLineNumberTableAttribute
protected void visitLineNumberTableAttribute(int index) -
visitRuntimeVisibleAnnotationsAttribute
protected void visitRuntimeVisibleAnnotationsAttribute(int index) -
visitRuntimeInvisibleAnnotationsAttribute
protected void visitRuntimeInvisibleAnnotationsAttribute(int index) -
visitAnnotation
protected void visitAnnotation() -
visitElementValuePair
protected void visitElementValuePair(int i) -
visitElementValue
protected void visitElementValue() -
startClassFile
protected void startClassFile(int major, int minor) -
endClassFile
protected void endClassFile() -
startConstantPool
protected void startConstantPool(int length) -
endConstantPool
protected void endConstantPool() -
constantUtf8
-
constantInteger
protected void constantInteger(int index, int value) -
constantFloat
protected void constantFloat(int index, float value) -
constantLong
protected void constantLong(int index, long value) -
constantDouble
protected void constantDouble(int index, double value) -
constantClass
protected void constantClass(int index, int nameIndex) -
constantString
protected void constantString(int index, int stringIndex) -
constantFieldref
protected void constantFieldref(int index, int classIndex, int nameAndTypeIndex) -
constantMethodref
protected void constantMethodref(int index, int classIndex, int nameAndTypeIndex) -
constantInterfaceMethodref
protected void constantInterfaceMethodref(int index, int classIndex, int nameAndTypeIndex) -
constantNameAndType
protected void constantNameAndType(int index, int nameIndex, int descriptorIndex) -
constantMethodHandle
protected void constantMethodHandle(int index, int referenceKind, int referenceIndex) -
constantMethodType
protected void constantMethodType(int index, int descriptorIndex) -
constantInvokeDynamic
protected void constantInvokeDynamic(int index, int bootstrapMethodAttrIndex, int nameAndTypeIndex) -
constantModule
protected void constantModule(int index, int nameIndex) -
constantPackage
protected void constantPackage(int index, int nameIndex) -
startClass
protected void startClass(int accessFlags, int thisClass, int superClass, int... interfaces) -
endClass
protected void endClass() -
startFields
protected void startFields(int length) -
endFields
protected void endFields() -
startField
protected void startField(int index, int accessFlags, int nameIndex, int descriptorIndex) -
endField
protected void endField() -
startMethods
protected void startMethods(int length) -
endMethods
protected void endMethods() -
startMethod
protected void startMethod(int index, int accessFlags, int nameIndex, int descriptorIndex) -
endMethod
protected void endMethod() -
startAttributes
protected void startAttributes(int length) -
endAttributes
protected void endAttributes() -
constantValue
protected void constantValue(int index, int valueIndex) -
startCode
protected void startCode(int index, int maxStack, int maxLocals, byte... code) -
endCode
protected void endCode() -
startExceptionHandlers
protected void startExceptionHandlers(int length) -
endExceptionHandlers
protected void endExceptionHandlers() -
exceptionHandler
protected void exceptionHandler(int startPC, int endPC, int handlerPC, int catchType) -
exceptions
protected void exceptions(int index, int... exceptionIndexTable) -
startInnerClasses
protected void startInnerClasses(int index, int length) -
endInnerClasses
protected void endInnerClasses() -
innerClass
protected void innerClass(int index, int innerClassIndex, int outerClassIndex, int innerNameIndex, int innerClassAccessFlags) -
sourceFile
protected void sourceFile(int index, int sourceFileIndex) -
startLineNumberTable
protected void startLineNumberTable(int index, int length) -
endLineNumberTable
protected void endLineNumberTable() -
lineNumber
protected void lineNumber(int index, int startPC, int lineNumber) -
attribute
protected void attribute(int index, int nameIndex, long length) -
startRuntimeVisibleAnnotations
protected void startRuntimeVisibleAnnotations() -
endRuntimeVisibleAnnotations
protected void endRuntimeVisibleAnnotations() -
startRuntimeInvisibleAnnotations
protected void startRuntimeInvisibleAnnotations() -
endRuntimeInvisibleAnnotations
protected void endRuntimeInvisibleAnnotations() -
startAnnotation
protected void startAnnotation(int typeIndex, int length) -
endAnnotation
protected void endAnnotation() -
startElementValuePair
protected void startElementValuePair(int index, int nameIndex) -
endElementValuePair
protected void endElementValuePair() -
elementValueByte
protected void elementValueByte(int valueIndex) -
elementValueChar
protected void elementValueChar(int valueIndex) -
elementValueDouble
protected void elementValueDouble(int valueIndex) -
elementValueFloat
protected void elementValueFloat(int valueIndex) -
elementValueInt
protected void elementValueInt(int valueIndex) -
elementValueLong
protected void elementValueLong(int valueIndex) -
elementValueShort
protected void elementValueShort(int valueIndex) -
elementValueBoolean
protected void elementValueBoolean(int valueIndex) -
elementValueString
protected void elementValueString(int valueIndex) -
elementValueEnum
protected void elementValueEnum(int typeIndex, int valueIndex) -
elementValueClass
protected void elementValueClass(int typeIndex) -
startElementValueAnnotation
protected void startElementValueAnnotation() -
endElementValueAnnotation
protected void endElementValueAnnotation() -
startElementValueArray
protected void startElementValueArray(int length) -
endElementValueArray
protected void endElementValueArray()
-