public class ClassFileDeclarationBuilder extends java.lang.Object implements java.lang.Comparable<ClassFileDeclarationBuilder>
ClassFileDeclarationManager
Constructor and Description |
---|
ClassFileDeclarationBuilder(ClassFileDeclarationManager manager,
ClassFile classFile)
create a new ClassDeclaration builder.
|
Modifier and Type | Method and Description |
---|---|
void |
attachToEnclosingDeclaration()
If this is a builder for an inner class, the declaration has to be
attached to the enclosing class.
|
int |
compareTo(ClassFileDeclarationBuilder o)
compare to class file declaration builders.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getClassName()
get the class name of this class.
|
java.lang.String |
getEnclosingName()
get the fully qualified name of the enclosing class of an inner class
|
java.lang.String |
getFullClassname()
get the class name stored in the class file.
|
int |
hashCode() |
boolean |
isAnonymousClass()
is the considered ClassFile the representation of an anymous class or a class
declared within a program?
This is the case if the last $ is followed by a digit.
|
boolean |
isInnerClass()
is the considered ClassFile the byte code of an inner class?
This is done checking the fully qualified class name.
|
CompilationUnit |
makeCompilationUnit()
retrieve the compilation unit for the class file under consideration.
|
static CompilationUnit |
makeEmptyClassDeclaration(ProgramFactory programFactory,
java.lang.String fullClassName)
make a stub class declaration for a fully qualified type reference.
|
TypeDeclaration |
makeTypeDeclaration()
retrieve a TypeDeclaration for the class file under consideration
The second and following calls will return the cached value of the
initial calculation.
|
void |
setDataLocation(DataLocation dataLocation)
set the location to be stored in the compilation unit, mainly for
error reporting.
|
java.lang.String |
toString() |
public ClassFileDeclarationBuilder(ClassFileDeclarationManager manager, ClassFile classFile)
classFile
- class file to be investigatedmanager
- the manager to which this builder belongspublic java.lang.String getFullClassname()
public java.lang.String getClassName()
public CompilationUnit makeCompilationUnit()
makeTypeDeclaration()
and embeds this type
into a compilation unit.public TypeDeclaration makeTypeDeclaration()
public void setDataLocation(DataLocation dataLocation)
dataLocation
- the DataLocation to be set or nullpublic boolean isInnerClass()
public boolean isAnonymousClass()
public void attachToEnclosingDeclaration()
public java.lang.String getEnclosingName()
public static CompilationUnit makeEmptyClassDeclaration(ProgramFactory programFactory, java.lang.String fullClassName) throws ParserException
programFactory
- factory to use as parserfullClassName
- the fully qualified type nameParserException
- thrown by the parserpublic java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(ClassFileDeclarationBuilder o)
compareTo
in interface java.lang.Comparable<ClassFileDeclarationBuilder>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2003-2019 The KeY-Project.