Class ClassParser
java.lang.Object
edu.umd.cs.findbugs.classfile.engine.ClassParser
- All Implemented Interfaces:
ClassParserInterface
Parse a class to extract symbolic information. see
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html
- Author:
- David Hovemeyer
-
Constructor Summary
ConstructorsConstructorDescriptionClassParser(DataInputStream in, ClassDescriptor expectedClassDescriptor, ICodeBaseEntry codeBaseEntry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidextractReferencedClassesFromSignature(Set<ClassDescriptor> referencedClassSet, String signature) voidparse(ClassInfo.Builder builder) Parse the class data into a ClassInfo object containing (some of) the class's symbolic information.voidparse(ClassNameAndSuperclassInfo.Builder builder) Parse the class data into a ClassNameAndSuperclassInfo object containing (some of) the class's symbolic information.
-
Constructor Details
-
ClassParser
public ClassParser(DataInputStream in, @CheckForNull ClassDescriptor expectedClassDescriptor, ICodeBaseEntry codeBaseEntry) Constructor.- Parameters:
in- the DataInputStream to read class data fromexpectedClassDescriptor- ClassDescriptor expected: null if unknowncodeBaseEntry- codebase entry class is loaded from
-
-
Method Details
-
parse
public void parse(ClassNameAndSuperclassInfo.Builder builder) throws InvalidClassFileFormatException Description copied from interface:ClassParserInterfaceParse the class data into a ClassNameAndSuperclassInfo object containing (some of) the class's symbolic information.- Specified by:
parsein interfaceClassParserInterface- Parameters:
builder- a ClassNameAndSuperclassInfo object to be filled in with (some of) the class's symbolic information- Throws:
InvalidClassFileFormatException
-
parse
Description copied from interface:ClassParserInterfaceParse the class data into a ClassInfo object containing (some of) the class's symbolic information.- Specified by:
parsein interfaceClassParserInterface- Parameters:
builder- a ClassInfo object to be filled in with (some of) the class's symbolic information- Throws:
InvalidClassFileFormatException
-
extractReferencedClassesFromSignature
public static void extractReferencedClassesFromSignature(Set<ClassDescriptor> referencedClassSet, String signature)
-