The access flags of this class.
The access flags of this class. To further analyze the access flags either use the corresponding convenience methods (e.g., isEnumDeclaration()) or the class org.opalj.bi.AccessFlagsIterator or the classes which inherit from org.opalj.bi.AccessFlag.
The list of all annotations.
The list of all annotations. In general, if a specific annotation is searched for the method runtimeVisibleAnnotations or runtimeInvisibleAnnotations should be used.
This class file's reified attributes.
This class file's reified attributes. Which attributes are reified depends on the configuration of the class file reader; e.g., org.opalj.br.reader.Java8Framework. The JVM specification defines the following attributes:
Returns this class file's bootstrap method table.
Returns this class file's bootstrap method table.
A class file's bootstrap method table may be removed at load time if the corresponding org.opalj.br.instructions.INVOKEDYNAMIC instructions are rewritten.
Each class file optionally defines a class signature.
All constructors/instance initialization methods (<init>) defined by this class.
All constructors/instance initialization methods (<init>) defined by this class.
(This does not include static initializers.)
Creates a shallow copy of this class file object.
The declared fields.
The declared fields. May be empty. The list is sorted by name.
Returns the method which directly overrides a method with the given properties.
Returns the method which directly overrides a method with the given properties.
This method is only defined for proper virtual methods.
Compares this class file with the given one to find (the first) differences which may lead to a different load or runtime behavior.
Compares this class file with the given one to find (the first) differences which may lead to a different load or runtime behavior. I.e., differences between this class and the given class which are irrelevant at load / runtime, such as the order in which the attributes are defined, are ignored.
None if this class file and the other are equal - i.e., if both
effectively implement the same class.
Returns the field with the given name and type.
Returns the field with the given name, if any.
Returns the field with the given name, if any.
The complexity is O(log2 n); this algorithm uses binary search.
Returns the method with the given name and descriptor that is declared by this class file.
Returns the method with the given name and descriptor that is declared by this class file.
The complexity is O(log2 n); this algorithm uses a binary search algorithm.
Returns the methods (including constructors and static initializers) with the given name, if any.
Returns the methods (including constructors and static initializers) with the given name, if any.
The complexity is O(log2 n); this algorithm uses binary search.
Iterates over all direct and indirect nested classes of this class file.
Iterates over all direct and indirect nested classes of this class file.
To collect all nested types:
var allNestedTypes: Set[ObjectType] = Set.empty foreachNestedClasses(innerclassesProject, { nc ⇒ allNestedTypes += nc.thisType })
The fully qualified name of the type defined by this class file.
Returns true if this class defines a so-called default constructor.
Returns true if this class defines a so-called default constructor. A
default constructor needs to be present, e.g., when the class is serializable.
The default constructor is the constructor that takes no parameters.
The result is recomputed.
This class file's hasCode.
This class file's hasCode. The hashCode is (by purpose) identical to
the id of the ObjectType it implements.
The unique id associated with the type defined by this class file.
Returns the inner classes attribute, if defined.
Returns the inner classes attribute, if defined.
The inner classes attribute contains (for inner classes) also a reference to its outer class. Furthermore, it contains references to other inner classes that are not an inner class of this class. If you are just interested in the inner classes of this class, use the method nested classes.
All defined instance methods.
All defined instance methods. I.e., all methods that are not static, constructors, or static initializers.
The set of implemented interfaces.
The set of implemented interfaces. May be empty.
Returns true if this class file defines an anonymous inner class.
Returns true if this class file defines an anonymous inner class.
This method relies on the inner classes attribute to identify anonymous inner classes.
Returns true if this (field, method, class) declaration is declared as deprecated.
Returns true if this (field, method, class) declaration is declared as deprecated.
The deprecated attribute is always set by the Java compiler when either the deprecated annotation or the JavaDoc tag is used.
Returns true if the class is final or if it only defines private constructors and it
is therefore not possible to inherit from this class.
Returns true if the class is final or if it only defines private constructors and it
is therefore not possible to inherit from this class.
An abstract type (abstract classes and interfaces) is never effectively final.
Returns true if this class file represents an interface.
Returns true if this class file represents an interface.
From the JVM point-of-view annotations are also interfaces!
org.opalj.br.analyses.Project to determine if this interface declaration is a functional interface.
true if the class file has package visibility.
true if the class file has package visibility. If false the method isPublic
will return true.
A class file cannot have private or protected visibility.
true if the class file has public visibility.
true if the class file has public visibility. If false the method isPackageVisible
will return true.
There is no private or protected visibility.
True if this element was created by the compiler and the attribute Synthetic
is present.
True if this element was created by the compiler and the attribute Synthetic
is present. Compilers are, however, free to use the attribute or the corresponding
access flag.
Returns true if this class file has no direct representation in the source code.
Returns true if this class file has no direct representation in the source code.
VirtualTypeFlag for further information.
The declared methods.
The declared methods. May be empty. The list is first sorted by name, and then by method descriptor.
Returns Java 9's module attribute if defined.
Returns the set of all immediate nested classes of this class.
Returns the set of all immediate nested classes of this class. I.e., returns those nested classes that are not defined in the scope of a nested class of this class.
Each class has at most one explicit, direct outer type.
Each class has at most one explicit, direct outer type. Note that a local class (a class defined in the scope of a method) or an anonymous class do not specify an outer type.
The object type of the outer type as well as the access flags of this inner class.
Compares this class file with the given one to check for differences which may lead to a different load or runtime behavior.
Compares this class file with the given one to check for differences which may lead to a different load or runtime behavior. I.e., differences between this class and the given class which are irrelevant at load-/runtime, such as the order in which the attributes are defined, are ignored.
The SourceDebugExtension attribute is an optional attribute [...].
The SourceDebugExtension attribute is an optional attribute [...]. There can be
at most one SourceDebugExtension attribute. The data (which is modified UTF8
String may, however, not be representable using a String object (see the
spec. for further details.)
The returned Array must not be mutated.
The SourceFile attribute is an optional attribute [...].
The SourceFile attribute is an optional attribute [...]. There can be
at most one SourceFile attribute.
The static initializer of this class.
The static initializer of this class.
The way how the static initializer is identified has changed with Java 7. In a class file whose version number is 51.0 or above, the method must have its ACC_STATIC flag set. Other methods named <clinit> in a class file are of no consequence.
The class type from which this class inherits.
The class type from which this class inherits. None if this
class file defines java.lang.Object or a module.
Returns OPAL's SynthesizedClassFiles attribute if it is defined.
The type implemented by this class file.
A pair of unsigned short values identifying the class file version number.
A pair of unsigned short values identifying the class file version number.
UShortPair(minorVersion, majorVersion).
Represents a single class file which either defines a class type or an interface type. (
Annotationtypes are also interface types andEnums are class types.)Equality of
ClassFileobjects is reference based and a class file's hash code is the same as the underlying ObjectType's hash code; i.e., 'thisType's hash code.