org.androidtransfuse.analysis.adapter
Enum ASTPrimitiveType

Package class diagram package ASTPrimitiveType
java.lang.Object
  extended by java.lang.Enum<ASTPrimitiveType>
      extended by org.androidtransfuse.analysis.adapter.ASTPrimitiveType
All Implemented Interfaces:
Serializable, Comparable<ASTPrimitiveType>, ASTBase, ASTType

public enum ASTPrimitiveType
extends Enum<ASTPrimitiveType>
implements ASTType

Element specific primitive AST type

Author:
John Ericksen

Enum Constant Summary
BOOLEAN
           
BYTE
           
CHAR
           
DOUBLE
           
FLOAT
           
INT
           
LONG
           
SHORT
           
 
Method Summary
 boolean extendsFrom(ASTType type)
          Determines if the current type extends from the given type.
<A extends Annotation>
A
getAnnotation(Class<A> annotation)
          Supplies the given annotation instance from the given annotation class key
 Collection<ASTAnnotation> getAnnotations()
          Supplies the set of annotations
 ASTAnnotation getASTAnnotation(Class annotation)
          Getter for the AST Annotation associated with the given annotation type
static ASTPrimitiveType getAutoboxType(String name)
           
 Collection<ASTConstructor> getConstructors()
          Supplies all available constructors
 Collection<ASTField> getFields()
          Supplies all available fields
 List<ASTType> getGenericParameters()
          Generates a list of the generic type parameters, if they are appropriate for the type and exist.
 Collection<ASTType> getInterfaces()
          Supplies the list of implemented interfaces
 Collection<ASTMethod> getMethods()
          Supplies all available methods
 String getName()
          Supplies the name of the current tree node
 Class getObjectClass()
           
 ASTType getSuperClass()
          Supplies the super class (by extension) of this type
 boolean implementsFrom(ASTType type)
          Determines if the current type implements the given type.
 boolean inheritsFrom(ASTType type)
          Determines if the current type inherits (extends or implements) from the given type.
 boolean isAnnotated(Class<? extends Annotation> annotation)
          Determines if the current element is annotated with the given annotation class
 boolean isArray()
          Determines if this type is an array type
 boolean isConcreteClass()
          Determines if the given AST type represents a concrete class
 String toString()
           
static ASTPrimitiveType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ASTPrimitiveType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BOOLEAN

public static final ASTPrimitiveType BOOLEAN

BYTE

public static final ASTPrimitiveType BYTE

SHORT

public static final ASTPrimitiveType SHORT

CHAR

public static final ASTPrimitiveType CHAR

INT

public static final ASTPrimitiveType INT

FLOAT

public static final ASTPrimitiveType FLOAT

LONG

public static final ASTPrimitiveType LONG

DOUBLE

public static final ASTPrimitiveType DOUBLE
Method Detail

values

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

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

valueOf

public static ASTPrimitiveType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isAnnotated

public boolean isAnnotated(Class<? extends Annotation> annotation)
Description copied from interface: ASTBase
Determines if the current element is annotated with the given annotation class

Specified by:
isAnnotated in interface ASTBase
Parameters:
annotation - key
Returns:
annotated conditional

getAnnotation

public <A extends Annotation> A getAnnotation(Class<A> annotation)
Description copied from interface: ASTBase
Supplies the given annotation instance from the given annotation class key

Specified by:
getAnnotation in interface ASTBase
Type Parameters:
A - annotation type
Parameters:
annotation - key
Returns:
annotation instance

getMethods

public Collection<ASTMethod> getMethods()
Description copied from interface: ASTType
Supplies all available methods

Specified by:
getMethods in interface ASTType
Returns:
available methods

getFields

public Collection<ASTField> getFields()
Description copied from interface: ASTType
Supplies all available fields

Specified by:
getFields in interface ASTType
Returns:
fields

getConstructors

public Collection<ASTConstructor> getConstructors()
Description copied from interface: ASTType
Supplies all available constructors

Specified by:
getConstructors in interface ASTType
Returns:
constructors

getName

public String getName()
Description copied from interface: ASTBase
Supplies the name of the current tree node

Specified by:
getName in interface ASTBase
Returns:
name of the current node

getObjectClass

public Class getObjectClass()

isConcreteClass

public boolean isConcreteClass()
Description copied from interface: ASTType
Determines if the given AST type represents a concrete class

Specified by:
isConcreteClass in interface ASTType
Returns:
concrete class status

getAnnotations

public Collection<ASTAnnotation> getAnnotations()
Description copied from interface: ASTBase
Supplies the set of annotations

Specified by:
getAnnotations in interface ASTBase
Returns:
ast annotation list

getInterfaces

public Collection<ASTType> getInterfaces()
Description copied from interface: ASTType
Supplies the list of implemented interfaces

Specified by:
getInterfaces in interface ASTType
Returns:
interfaces implemented

getSuperClass

public ASTType getSuperClass()
Description copied from interface: ASTType
Supplies the super class (by extension) of this type

Specified by:
getSuperClass in interface ASTType
Returns:
supertype

isArray

public boolean isArray()
Description copied from interface: ASTType
Determines if this type is an array type

Specified by:
isArray in interface ASTType
Returns:
array type

getGenericParameters

public List<ASTType> getGenericParameters()
Description copied from interface: ASTType
Generates a list of the generic type parameters, if they are appropriate for the type and exist.

Specified by:
getGenericParameters in interface ASTType
Returns:
generic parameters

getAutoboxType

public static ASTPrimitiveType getAutoboxType(String name)

inheritsFrom

public boolean inheritsFrom(ASTType type)
Description copied from interface: ASTType
Determines if the current type inherits (extends or implements) from the given type.

Specified by:
inheritsFrom in interface ASTType
Parameters:
type - implementing from
Returns:
inheritance

extendsFrom

public boolean extendsFrom(ASTType type)
Description copied from interface: ASTType
Determines if the current type extends from the given type.

Specified by:
extendsFrom in interface ASTType
Parameters:
type - implementing from
Returns:
inheritance

implementsFrom

public boolean implementsFrom(ASTType type)
Description copied from interface: ASTType
Determines if the current type implements the given type.

Specified by:
implementsFrom in interface ASTType
Parameters:
type - implementing from
Returns:
inheritance

getASTAnnotation

public ASTAnnotation getASTAnnotation(Class annotation)
Description copied from interface: ASTBase
Getter for the AST Annotation associated with the given annotation type

Specified by:
getASTAnnotation in interface ASTBase
Parameters:
annotation - type
Returns:
annotation AST

toString

public String toString()
Overrides:
toString in class Enum<ASTPrimitiveType>


Copyright © 2012. All Rights Reserved.