org.androidtransfuse.analysis.adapter
Class ASTMethodUniqueSignatureDecorator

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

public class ASTMethodUniqueSignatureDecorator
extends Object
implements ASTMethod

Class to decorate an ASTMethod with an equals and hashcode based on the method signature. This helps enforce uniqueness of a method on a class throughout the inheritance hierarchy.


Constructor Summary
ASTMethodUniqueSignatureDecorator(ASTMethod method)
           
 
Method Summary
 boolean equals(Object o)
           
 ASTAccessModifier getAccessModifier()
          Supplies the access modifier for this method.
<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
 String getName()
          Supplies the name of the current tree node
 List<ASTParameter> getParameters()
          Supplies all parameters of this method
 ASTType getReturnType()
          Supplies the return type of this method
 List<ASTType> getThrowsTypes()
          Supplies all throws associated with this method
 int hashCode()
           
 boolean isAnnotated(Class<? extends Annotation> annotation)
          Determines if the current element is annotated with the given annotation class
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTMethodUniqueSignatureDecorator

public ASTMethodUniqueSignatureDecorator(ASTMethod method)
Method Detail

getParameters

public List<ASTParameter> getParameters()
Description copied from interface: ASTMethod
Supplies all parameters of this method

Specified by:
getParameters in interface ASTMethod
Returns:
method parameters

getReturnType

public ASTType getReturnType()
Description copied from interface: ASTMethod
Supplies the return type of this method

Specified by:
getReturnType in interface ASTMethod
Returns:
return type

getAccessModifier

public ASTAccessModifier getAccessModifier()
Description copied from interface: ASTMethod
Supplies the access modifier for this method.

Specified by:
getAccessModifier in interface ASTMethod
Returns:
method access modifier

getThrowsTypes

public List<ASTType> getThrowsTypes()
Description copied from interface: ASTMethod
Supplies all throws associated with this method

Specified by:
getThrowsTypes in interface ASTMethod
Returns:
throw types

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

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

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

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

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

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012. All Rights Reserved.