org.androidtransfuse.analysis.adapter
Class ASTElementType

Package class diagram package ASTElementType
java.lang.Object
  extended by org.androidtransfuse.analysis.adapter.ASTElementBase
      extended by org.androidtransfuse.analysis.adapter.ASTElementType
All Implemented Interfaces:
ASTBase, ASTType

public class ASTElementType
extends ASTElementBase
implements ASTType

Element specific AST Type

Author:
John Ericksen

Constructor Summary
ASTElementType(TypeElement typeElement, com.google.common.collect.ImmutableCollection<ASTConstructor> constructors, com.google.common.collect.ImmutableCollection<ASTMethod> methods, com.google.common.collect.ImmutableCollection<ASTField> fields, ASTType superClass, com.google.common.collect.ImmutableCollection<ASTType> interfaces, com.google.common.collect.ImmutableCollection<ASTAnnotation> annotations)
           
 
Method Summary
 boolean equals(Object o)
           
 boolean extendsFrom(ASTType type)
          Determines if the current type extends from the given type.
 ASTAnnotation getASTAnnotation(Class annotation)
          Getter for the AST Annotation associated with the given annotation type
 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
 ASTType getSuperClass()
          Supplies the super class (by extension) of this type
 int hashCode()
           
 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 isArray()
          Determines if this type is an array type
 boolean isConcreteClass()
          Determines if the given AST type represents a concrete class
 String toString()
           
 
Methods inherited from class org.androidtransfuse.analysis.adapter.ASTElementBase
getAnnotation, getAnnotations, isAnnotated
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.androidtransfuse.analysis.adapter.ASTBase
getAnnotation, getAnnotations, isAnnotated
 

Constructor Detail

ASTElementType

public ASTElementType(TypeElement typeElement,
                      com.google.common.collect.ImmutableCollection<ASTConstructor> constructors,
                      com.google.common.collect.ImmutableCollection<ASTMethod> methods,
                      com.google.common.collect.ImmutableCollection<ASTField> fields,
                      ASTType superClass,
                      com.google.common.collect.ImmutableCollection<ASTType> interfaces,
                      com.google.common.collect.ImmutableCollection<ASTAnnotation> annotations)
Method Detail

getName

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

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

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

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

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

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

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

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

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

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
Overrides:
getASTAnnotation in class ASTElementBase
Parameters:
annotation - type
Returns:
annotation AST

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.