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

public class ClassFileVisitor<D> extends Object implements Runnable
Abstract algorithm for traversing a class file.
  • Field Details

  • Constructor Details

    • ClassFileVisitor

      protected ClassFileVisitor(D documentId, ByteBuffer buffer)
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getUTF8

      protected String getUTF8(int index)
    • receiveError

      protected void receiveError(D docid, String text, Object... args)
      Hook method must be overridden by any user.
      Parameters:
      docid - the identifier of the read class file
      text - error text
      args - error text arguments
    • error

      protected void error(String format, Object... args)
    • 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

      protected void constantUtf8(int index, String text)
    • 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()