RECODER 0.92

recoder.bytecode
Class ClassFile

java.lang.Object
  extended by recoder.bytecode.ByteCodeElement
      extended by recoder.bytecode.ClassFile
All Implemented Interfaces:
ClassType, ClassTypeContainer, Member, ProgramModelElement, Type, AccessFlags, ModelElement, NamedModelElement

public class ClassFile
extends ByteCodeElement
implements ClassType


Nested Class Summary
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Field Summary
 
Fields inherited from class recoder.bytecode.ByteCodeElement
accessFlags, service
 
Fields inherited from interface recoder.abstraction.ProgramModelElement
LEXICAL_ORDER
 
Fields inherited from interface recoder.bytecode.AccessFlags
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Fields inherited from interface recoder.abstraction.ProgramModelElement
LEXICAL_ORDER
 
Fields inherited from interface recoder.bytecode.AccessFlags
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Fields inherited from interface recoder.abstraction.ProgramModelElement
LEXICAL_ORDER
 
Fields inherited from interface recoder.bytecode.AccessFlags
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Method Summary
 ArrayType createArrayType()
           
 java.util.List<Field> getAllFields()
          Returns all visible fields that are defined in this class type or any of its supertypes.
 java.util.List<Method> getAllMethods()
          Returns all visible methods that are defined in this class type or any of its supertypes.
 java.util.List<ClassType> getAllSupertypes()
          Returns the list of all supertypes of this class type, in topological order, including the class type itself as first element.
 java.util.List<ClassType> getAllTypes()
          Returns all class types that are inner types of this class type, including visible inherited types.
 java.util.List<AnnotationUseInfo> getAnnotations()
          Returns a list of Annotations.
 ArrayType getArrayType()
           
 java.lang.String getBinaryName()
          Returns the binary name.
 java.util.List<ConstructorInfo> getConstructorInfos()
           
 java.util.List<? extends Constructor> getConstructors()
          Returns the constructors locally defined within this class type.
 ClassTypeContainer getContainer()
          Returns the enclosing package or class type, or method.
 ClassType getContainingClassType()
          Returns the logical parent type of this member.
 ErasedType getErasedType()
           
 java.util.List<FieldInfo> getFieldInfos()
           
 java.util.List<FieldInfo> getFields()
          Returns the fields locally defined within this class type.
 java.lang.String getFullName()
          Returns the maximal expanded name including all applicable qualifiers.
 java.lang.String getFullSignature()
          Returns a full type signature of this type, i.e., the full name plus possible type arguments.
 java.lang.String[] getInnerClassNames()
           
 java.lang.String[] getInterfaceNames()
           
 java.lang.String getLocation()
           
 java.util.List<MethodInfo> getMethodInfos()
           
 java.util.List<Method> getMethods()
          Returns the methods locally defined within this class type.
 Package getPackage()
          Returns the package this element is defined in.
 java.lang.String getPhysicalName()
          Deprecated. 
 java.lang.String getSuperClassName()
           
 java.util.List<TypeArgumentInfo> getSuperClassTypeArguments()
           
 java.util.List<TypeArgumentInfo> getSuperInterfaceTypeArguments(int ifidx)
           
 java.util.List<ClassType> getSupertypes()
          Returns the list of locally declared supertypes of this class type.
 java.lang.String getTypeName()
           
 java.util.List<TypeParameterInfo> getTypeParameters()
          Returns the type parameters of this class type.
 java.util.List<ClassFile> getTypes()
          Returns the class types locally defined within this container.
 boolean isAnnotationType()
          Checks if this class type denotes an annotation type
 boolean isEnumType()
          Checks if this class type denotes an enum type
 boolean isInner()
          Checks if this type is an inner class, as described in JLS, 3rd edition, §8.1.3
 boolean isInterface()
          Checks if this class type denotes an interface (i.e. ordinary interface or annotation type).
 boolean isOrdinaryClass()
          Checks if this class type denotes an ordinary (i.e. not an enum) class.
 boolean isOrdinaryInterface()
          Checks if this class type denotes an ordinary (i.e. not annotation type) interface.
 void setTypeParameters(java.util.List<TypeParameterInfo> typeParams)
           
 java.lang.String toString()
           
 
Methods inherited from class recoder.bytecode.ByteCodeElement
getAccessFlags, getName, getProgramModelInfo, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictFp, isSynchronized, setAccessFlags, setProgramModelInfo, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface recoder.abstraction.ClassType
isAbstract
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.ModelElement
validate
 
Methods inherited from interface recoder.abstraction.Member
isFinal, isPrivate, isProtected, isPublic, isStatic, isStrictFp
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.ModelElement
validate
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.ModelElement
validate
 

Method Detail

getArrayType

public ArrayType getArrayType()
Specified by:
getArrayType in interface Type
Returns:

createArrayType

public ArrayType createArrayType()
Specified by:
createArrayType in interface Type
Returns:

getTypeName

public final java.lang.String getTypeName()
Specified by:
getTypeName in class ByteCodeElement

getSuperClassName

public final java.lang.String getSuperClassName()

getSuperClassTypeArguments

public final java.util.List<TypeArgumentInfo> getSuperClassTypeArguments()

getInterfaceNames

public final java.lang.String[] getInterfaceNames()

getSuperInterfaceTypeArguments

public final java.util.List<TypeArgumentInfo> getSuperInterfaceTypeArguments(int ifidx)

getFieldInfos

public final java.util.List<FieldInfo> getFieldInfos()

getMethodInfos

public final java.util.List<MethodInfo> getMethodInfos()

getConstructorInfos

public final java.util.List<ConstructorInfo> getConstructorInfos()

getInnerClassNames

public final java.lang.String[] getInnerClassNames()

getFullName

public final java.lang.String getFullName()
Description copied from interface: ProgramModelElement
Returns the maximal expanded name including all applicable qualifiers.

Specified by:
getFullName in interface ProgramModelElement
Returns:
the full name of this program model element.

getBinaryName

public java.lang.String getBinaryName()
Description copied from interface: ProgramModelElement
Returns the binary name. The binary name is the name this program model element would have in bytecode, i.e., how it either is read by the bytecode parser, or the name a compiler would give this element during the compilation process (if this program model element is represented in source code). See JLS, §13.1

Specified by:
getBinaryName in interface ProgramModelElement
Returns:
the bytecode name of this program model element

getPhysicalName

@Deprecated
public final java.lang.String getPhysicalName()
Deprecated. 

Deprecated as of 0.92. Use getBinaryName() instead.

Returns:
the physical (=binary) name of this ClassFile
See Also:
getBinaryName

getContainer

public final ClassTypeContainer getContainer()
Description copied from interface: ClassTypeContainer
Returns the enclosing package or class type, or method. A package will report null, a methods its enclosing class.

Specified by:
getContainer in interface ClassTypeContainer
Returns:
the container of this element.

getContainingClassType

public ClassType getContainingClassType()
Description copied from interface: Member
Returns the logical parent type of this member.

Specified by:
getContainingClassType in interface Member
Returns:
the class type containing this member.

getPackage

public final Package getPackage()
Description copied from interface: ClassTypeContainer
Returns the package this element is defined in. Packages have no recursive scope and report themselves.

Specified by:
getPackage in interface ClassTypeContainer
Returns:
the package of this element.

isInterface

public final boolean isInterface()
Description copied from interface: ClassType
Checks if this class type denotes an interface (i.e. ordinary interface or annotation type).

Specified by:
isInterface in interface ClassType
Returns:
true if this object represents an interface, false otherwise.

isOrdinaryInterface

public boolean isOrdinaryInterface()
Description copied from interface: ClassType
Checks if this class type denotes an ordinary (i.e. not annotation type) interface.

Specified by:
isOrdinaryInterface in interface ClassType
Returns:
true if this object represents an ordinary interface, false otherwise.

isAnnotationType

public boolean isAnnotationType()
Description copied from interface: ClassType
Checks if this class type denotes an annotation type

Specified by:
isAnnotationType in interface ClassType
Returns:
true if this object represents an annotation type, false otherwise

isEnumType

public boolean isEnumType()
Description copied from interface: ClassType
Checks if this class type denotes an enum type

Specified by:
isEnumType in interface ClassType
Returns:
true if this object represents an enum type, false otherwise

isOrdinaryClass

public boolean isOrdinaryClass()
Description copied from interface: ClassType
Checks if this class type denotes an ordinary (i.e. not an enum) class.

Specified by:
isOrdinaryClass in interface ClassType
Returns:
true if this object represents an ordinary class type, false otherwise

getSupertypes

public final java.util.List<ClassType> getSupertypes()
Description copied from interface: ClassType
Returns the list of locally declared supertypes of this class type.

Specified by:
getSupertypes in interface ClassType
Returns:
the list of locally defined supertypes of this type.

getAllSupertypes

public final java.util.List<ClassType> getAllSupertypes()
Description copied from interface: ClassType
Returns the list of all supertypes of this class type, in topological order, including the class type itself as first element. The order allows to resolve member overloading or overloading.

Specified by:
getAllSupertypes in interface ClassType
Returns:
the list of all supertypes of this type in topological order.

getFields

public final java.util.List<FieldInfo> getFields()
Description copied from interface: ClassType
Returns the fields locally defined within this class type.

Specified by:
getFields in interface ClassType
Returns:
the list of field members of this type.

getAllFields

public final java.util.List<Field> getAllFields()
Description copied from interface: ClassType
Returns all visible fields that are defined in this class type or any of its supertypes. The fields are in topological order with respect to the inheritance hierarchy.

Specified by:
getAllFields in interface ClassType
Returns:
the list of visible field members of this type and its supertypes.

getMethods

public final java.util.List<Method> getMethods()
Description copied from interface: ClassType
Returns the methods locally defined within this class type.

Specified by:
getMethods in interface ClassType
Returns:
the list of methods of this type.

getAllMethods

public final java.util.List<Method> getAllMethods()
Description copied from interface: ClassType
Returns all visible methods that are defined in this class type or any of its supertypes. The methods are in topological order with respect to the inheritance hierarchy.

Specified by:
getAllMethods in interface ClassType
Returns:
the list of visible methods of this type and its supertypes.

getConstructors

public final java.util.List<? extends Constructor> getConstructors()
Description copied from interface: ClassType
Returns the constructors locally defined within this class type.

Specified by:
getConstructors in interface ClassType
Returns:
the list of constructors of this type.

getTypes

public final java.util.List<ClassFile> getTypes()
Description copied from interface: ClassTypeContainer
Returns the class types locally defined within this container. Returns inner types when this container is a class type.

Specified by:
getTypes in interface ClassTypeContainer
Returns:
a list of contained class types.

getAllTypes

public final java.util.List<ClassType> getAllTypes()
Description copied from interface: ClassType
Returns all class types that are inner types of this class type, including visible inherited types.

Specified by:
getAllTypes in interface ClassType
Returns:
a list of class types that are members of this type or any of its supertypes.
See Also:
ClassType.getAllSupertypes()

getAnnotations

public java.util.List<AnnotationUseInfo> getAnnotations()
Description copied from interface: Member
Returns a list of Annotations.

Specified by:
getAnnotations in interface Member
Returns:
a list of annotations

getTypeParameters

public java.util.List<TypeParameterInfo> getTypeParameters()
Description copied from interface: ClassType
Returns the type parameters of this class type.

Specified by:
getTypeParameters in interface ClassType
Returns:
the list of type parameters of this class type.

setTypeParameters

public void setTypeParameters(java.util.List<TypeParameterInfo> typeParams)

getLocation

public java.lang.String getLocation()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getFullSignature

public java.lang.String getFullSignature()
Description copied from interface: Type
Returns a full type signature of this type, i.e., the full name plus possible type arguments. Works as getFullName() on primitive types.

Specified by:
getFullSignature in interface Type

getErasedType

public ErasedType getErasedType()
Specified by:
getErasedType in interface ClassType

isInner

public boolean isInner()
Description copied from interface: ClassType
Checks if this type is an inner class, as described in JLS, 3rd edition, §8.1.3

Specified by:
isInner in interface ClassType
Returns:

RECODER 0.92