org.apache.beehive.controls.runtime.generator
Class AptMethod

Object
  extended by AptMethod
Direct Known Subclasses:
AptEvent, AptEventHandler, AptOperation

public class AptMethod
extends Object

The AptMethod class defines a base set of utility methods for acessing method attributes based upon an APT method declaration.


Constructor Summary
AptMethod(MethodDeclaration methodDecl, TwoPhaseAnnotationProcessor ap)
          Constructs a new AptMethod instance associated with a specific method declaration
 
Method Summary
 String getArgDecl()
          Returns the arguments declarations for the method, with no formal parameter binding applied
 String getArgDecl(HashMap<String,TypeMirror> bindingMap)
          Returns the argument declaration of the method, applying the bindings in the provided type map to any parameter types
 String getArgList()
          Default form of getArgList, that does not quote delimit arguments
 String getArgList(boolean quoteDelimit)
          Returns the the method argument names, in a comma separated list
 String getArgTypes()
          Returns the the method argument classes, in a comma separated list
 String getDefaultReturnValue()
          Returns a default return value string for the method, with no type binding applied
 String getDefaultReturnValue(HashMap<String,TypeMirror> typeBinding)
          Returns a default return value string for the method, based upon bound return type
 FeatureInfo getFeatureInfo()
          Returns any FeatureInfo associated with the method (or null if none)
 String getFormalTypes()
          Returns the declaration of any generic formal types associated with the method
 int getIndex()
          Returns the unique index value for this method.
 String getInterceptorDecl()
          Returns the names of interceptor service interfaces associated with this operation, formatted as a constant initializer string.
 Collection<String> getInterceptorServiceNames()
          Returns the names of interceptor service interfaces associated with this operation
 String getName()
          Returns the name of the method
 String getReturnType()
          Returns the method return type with no type bindings applied
 String getReturnType(HashMap<String,TypeMirror> bindingMap)
          Returns the method return type, applying any formal type parameter bindings defined by the provided map.
 String getThrowsClause()
          Returns the throws clause of the operation
 ArrayList<String> getThrowsList()
          Returns an ArrayList of thrown exceptions
 boolean hasParameterizedArguments()
          Returns 'true' if the method uses any parameterized types as parameters
 void setIndex(int index)
          Sets the unique index value for this method.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AptMethod

public AptMethod(MethodDeclaration methodDecl,
                 TwoPhaseAnnotationProcessor ap)
Constructs a new AptMethod instance associated with a specific method declaration

Method Detail

getName

public String getName()
Returns the name of the method


getArgDecl

public String getArgDecl(HashMap<String,TypeMirror> bindingMap)
Returns the argument declaration of the method, applying the bindings in the provided type map to any parameter types


getArgDecl

public String getArgDecl()
Returns the arguments declarations for the method, with no formal parameter binding applied


getArgList

public String getArgList(boolean quoteDelimit)
Returns the the method argument names, in a comma separated list


getArgList

public String getArgList()
Default form of getArgList, that does not quote delimit arguments


getArgTypes

public String getArgTypes()
Returns the the method argument classes, in a comma separated list


hasParameterizedArguments

public boolean hasParameterizedArguments()
Returns 'true' if the method uses any parameterized types as parameters


getFormalTypes

public String getFormalTypes()
Returns the declaration of any generic formal types associated with the method


getReturnType

public String getReturnType(HashMap<String,TypeMirror> bindingMap)
Returns the method return type, applying any formal type parameter bindings defined by the provided map.


getReturnType

public String getReturnType()
Returns the method return type with no type bindings applied


getThrowsClause

public String getThrowsClause()
Returns the throws clause of the operation


getThrowsList

public ArrayList<String> getThrowsList()
Returns an ArrayList of thrown exceptions


getDefaultReturnValue

public String getDefaultReturnValue(HashMap<String,TypeMirror> typeBinding)
Returns a default return value string for the method, based upon bound return type


getDefaultReturnValue

public String getDefaultReturnValue()
Returns a default return value string for the method, with no type binding applied


getFeatureInfo

public FeatureInfo getFeatureInfo()
Returns any FeatureInfo associated with the method (or null if none)


setIndex

public void setIndex(int index)
Sets the unique index value for this method. If a particular method is overloaded, then each associated AptMethod will have a unique index; otherwise, the index is -1.


getIndex

public int getIndex()
Returns the unique index value for this method.


getInterceptorServiceNames

public Collection<String> getInterceptorServiceNames()
Returns the names of interceptor service interfaces associated with this operation

Returns:
the names of the interceptor service interfaces associated with this operation

getInterceptorDecl

public String getInterceptorDecl()
Returns the names of interceptor service interfaces associated with this operation, formatted as a constant initializer string.

Returns:
the names of the interceptor service interfaces associated with this operation