RECODER 0.92

recoder.abstraction
Class NullType

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

public class NullType
extends java.lang.Object
implements ClassType

A program model element representing the null type.

Author:
AL, RN

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
static java.lang.String NULL
          The name of this type.
 
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
 
Constructor Summary
NullType(ProgramModelInfo info)
          Create a new null type for the given program model info.
 
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, including this type.
 java.util.List<ClassType> getAllTypes()
          Returns all class types that are inner types of this class type.
 java.util.List<? extends AnnotationUse> getAnnotations()
          returns null
 ArrayType getArrayType()
           
 java.lang.String getBinaryName()
          Returns the binary name.
 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 class of this member.
 ErasedType getErasedType()
           
 java.util.List<? extends Field> getFields()
          Returns the fields locally defined within this class type.
 java.lang.String getFullName()
          Returns the name of this element.
 java.lang.String getFullSignature()
          Returns a full type signature of this type, i.e., the full name plus possible type arguments.
 java.util.List<Method> getMethods()
          Returns the methods locally defined within this class type.
 java.lang.String getName()
          Returns the name of this element.
 Package getPackage()
          Returns the package this element is defined in.
 ProgramModelInfo getProgramModelInfo()
          Returns the instance that can retrieve information about this program model element.
 java.util.List<ClassType> getSupertypes()
          Returns the list of locally declared supertypes of this class type.
 java.util.List<? extends TypeParameter> getTypeParameters()
          Returns the type parameters of this class type.
 java.util.List<? extends ClassType> getTypes()
          Returns the (empty) list of class types locally defined within this container.
 boolean isAbstract()
          Checks if this member is abstract.
 boolean isAnnotationType()
          Checks if this class type denotes an annotation type
 boolean isEnumType()
          Checks if this class type denotes an enum type
 boolean isFinal()
          Checks if this member is final.
 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.
 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.
 boolean isPrivate()
          Checks if this member is private.
 boolean isProtected()
          Checks if this member is protected.
 boolean isPublic()
          Checks if this member is public.
 boolean isStatic()
          Checks if this member is static.
 boolean isStrictFp()
          Checks if this member is strictfp.
 void setProgramModelInfo(ProgramModelInfo info)
          Sets the instance that can retrieve information about this program model element.
 void validate()
          Check consistency and admissibility of a construct, e.g. cardinality of participants.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final java.lang.String NULL
The name of this type.

Constructor Detail

NullType

public NullType(ProgramModelInfo info)
Create a new null type for the given program model info.

Parameters:
info - the program model info responsible for this type.
Method Detail

getArrayType

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

createArrayType

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

getName

public java.lang.String getName()
Returns the name of this element.

Specified by:
getName in interface NamedModelElement
Returns:
"null".

getFullName

public java.lang.String getFullName()
Returns the name of this element.

Specified by:
getFullName in interface ProgramModelElement
Returns:
"null".

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

getProgramModelInfo

public ProgramModelInfo getProgramModelInfo()
Returns the instance that can retrieve information about this program model element.

Specified by:
getProgramModelInfo in interface ProgramModelElement
Returns:
the program model info of this element.

setProgramModelInfo

public void setProgramModelInfo(ProgramModelInfo info)
Sets the instance that can retrieve information about this program model element.

Specified by:
setProgramModelInfo in interface ProgramModelElement
Parameters:
info - the program model info for this element.

validate

public void validate()
Description copied from interface: ModelElement
Check consistency and admissibility of a construct, e.g. cardinality of participants. Should only check syntactical correctness, not semantical correctness.
For checking, e.g., if an AST element of type recoder.java.statement.If has a boolean parameter as condition, recoder.service.SemanticsChecker

Specified by:
validate in interface ModelElement
See Also:
SemanticsChecker

isFinal

public boolean isFinal()
Checks if this member is final.

Specified by:
isFinal in interface Member
Returns:
true.

isStatic

public boolean isStatic()
Checks if this member is static.

Specified by:
isStatic in interface Member
Returns:
true.

isPrivate

public boolean isPrivate()
Checks if this member is private.

Specified by:
isPrivate in interface Member
Returns:
false.

isProtected

public boolean isProtected()
Checks if this member is protected.

Specified by:
isProtected in interface Member
Returns:
false.

isPublic

public boolean isPublic()
Checks if this member is public.

Specified by:
isPublic in interface Member
Returns:
true.

isStrictFp

public boolean isStrictFp()
Checks if this member is strictfp.

Specified by:
isStrictFp in interface Member
Returns:
false.

getTypes

public java.util.List<? extends ClassType> getTypes()
Returns the (empty) list of class types locally defined within this container.

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

getAllTypes

public java.util.List<ClassType> getAllTypes()
Returns all class types that are inner types of this class type.

Specified by:
getAllTypes in interface ClassType
Returns:
an empty list of class types.
See Also:
ClassType.getAllSupertypes()

getContainingClassType

public ClassType getContainingClassType()
Returns the logical parent class of this member.

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

getContainer

public ClassTypeContainer getContainer()
Returns the enclosing package or class type, or method.

Specified by:
getContainer in interface ClassTypeContainer
Returns:
null.

isInterface

public boolean isInterface()
Checks if this class type denotes an interface.

Specified by:
isInterface in interface ClassType
Returns:
false.

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

isAbstract

public boolean isAbstract()
Checks if this member is abstract.

Specified by:
isAbstract in interface ClassType
Returns:
false.
See Also:
ClassType.isInterface()

getSupertypes

public java.util.List<ClassType> getSupertypes()
Returns the list of locally declared supertypes of this class type.

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

getAllSupertypes

public java.util.List<ClassType> getAllSupertypes()
Returns the list of all supertypes of this class type, including this type.

Specified by:
getAllSupertypes in interface ClassType
Returns:
a list with this element as single member.

getFields

public java.util.List<? extends Field> getFields()
Returns the fields locally defined within this class type.

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

getAllFields

public java.util.List<Field> getAllFields()
Returns all visible fields that are defined in this class type or any of its supertypes.

Specified by:
getAllFields in interface ClassType
Returns:
the (empty) list of visible field members of this type.

getMethods

public java.util.List<Method> getMethods()
Returns the methods locally defined within this class type.

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

getConstructors

public java.util.List<? extends Constructor> getConstructors()
Returns the constructors locally defined within this class type.

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

getAllMethods

public java.util.List<Method> getAllMethods()
Returns all visible methods that are defined in this class type or any of its supertypes.

Specified by:
getAllMethods in interface ClassType
Returns:
the (empty) list of visible methods of this type.

getPackage

public Package getPackage()
Returns the package this element is defined in.

Specified by:
getPackage in interface ClassTypeContainer
Returns:
null.

getAnnotations

public java.util.List<? extends AnnotationUse> getAnnotations()
returns null

Specified by:
getAnnotations in interface Member
Returns:
the annotations

getTypeParameters

public java.util.List<? extends TypeParameter> 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.

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