RECODER 0.92

recoder.abstraction
Enum PrimitiveType

java.lang.Object
  extended by java.lang.Enum<PrimitiveType>
      extended by recoder.abstraction.PrimitiveType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PrimitiveType>, ProgramModelElement, Type, AccessFlags, ModelElement, NamedModelElement

public enum PrimitiveType
extends java.lang.Enum<PrimitiveType>
implements Type

A program model element representing primitive types. As of 0.90, implemented as an enum.

Author:
AL, RN

Nested Class Summary
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Enum Constant Summary
booleanType
           
byteType
           
charType
           
doubleType
           
floatType
           
intType
           
longType
           
shortType
           
 
Field Summary
 
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()
           
 PrimitiveType deepClone()
           
 java.util.List<PrimitiveType> getAllSupertypes()
           
 ArrayType getArrayType()
           
 java.lang.String getBinaryName()
          Returns the binary name.
 java.lang.String getFullName()
          Returns the name of type.
 java.lang.String getFullSignature()
          Returns a full type signature of this type, i.e., the full name plus possible type arguments.
 java.lang.String getName()
          Returns the name of this type.
 ProgramModelInfo getProgramModelInfo()
          Returns the instance that can retrieve information about this program model element.
 java.util.List<PrimitiveType> getSupertypes()
           
 void setProgramModelInfo(ProgramModelInfo service)
          Sets the instance that can retrieve information about this program model element.
 java.lang.String toString()
           
 void validate()
          Check consistency and admissibility of a construct, e.g. cardinality of participants.
static PrimitiveType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PrimitiveType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

booleanType

public static final PrimitiveType booleanType

byteType

public static final PrimitiveType byteType

shortType

public static final PrimitiveType shortType

longType

public static final PrimitiveType longType

intType

public static final PrimitiveType intType

floatType

public static final PrimitiveType floatType

doubleType

public static final PrimitiveType doubleType

charType

public static final PrimitiveType charType
Method Detail

values

public static final PrimitiveType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(PrimitiveType c : PrimitiveType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static PrimitiveType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

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 type.

Specified by:
getName in interface NamedModelElement
Returns:
the name of this type.

getFullName

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

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

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 service)
Sets the instance that can retrieve information about this program model element.

Specified by:
setProgramModelInfo in interface ProgramModelElement
Parameters:
service - 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

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

deepClone

public PrimitiveType deepClone()

getAllSupertypes

public java.util.List<PrimitiveType> getAllSupertypes()

getSupertypes

public java.util.List<PrimitiveType> getSupertypes()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<PrimitiveType>

RECODER 0.92