method

File method.str
Author Martin Bravenboer <martin@cs.uu.nl>
Since unknown

Abstract Java Method




Statistics


General
Lines of code 266
Stratego
Module number 1 (100% documented)
Constructor number 0
Overlay number 0
Strategy number 20 (80% documented)
Rule number 0
DynamicRule number 1 (0% documented)



Strategy summary


get-access Returns the access of this method method.str
get-canonical-name Return name that uniquely identifiers a method method.str
get-formal-parameter-types(ATerm inclass) n/a method.str
get-formal-parameter-types(ATerm intype) n/a method.str
get-formal-parameter-types-in-class(ATerm inclass) Returns the formal parameter types of this method if this method is invoked as a member of the given class method.str
get-formal-parameter-types-in-type(ATerm intype) Returns the formal parameter types of this method if this method is invoked as a member of the given type method.str
get-formal-type-parameter(ATerm name) Returns the type parameter of the given name, or fails if this class thus have a type parameter with this name method.str
get-formal-type-parameters Abstract method method.str
get-member-type-in-class-helper(Strategy declaredgetter, Strategy resultgetter, Strategy typegetter, ATerm inclass) OMG! method.str
get-member-type-in-type-helper(Strategy getter, ATerm intype) n/a method.str
get-name Returns the MethodName of this method method.str
get-return-type(ATerm inclass) n/a method.str
get-return-type(ATerm intype) n/a method.str
get-return-type-in-class(ATerm inclass) Returns the return type of this method if this method is invoked as a member of the given class method.str
get-return-type-in-type(ATerm intype) Returns the return type of this method if this method is invoked as a member of the given type method.str
has-formal-type-parameter(ATerm name) Succeeds if this class has a type parameter of the given name method.str
instanceof-JavaMember Every Java method is a Java member method.str
instanceof-JavaMethod Checks if current term is an instance of JavaClass method.str
is-fixed-arity-method Succeeds if this method does not take a variable number of arguments method.str
is-generic Succeeds if this is a generic method (i method.str



Strategy details


ATerm get-access
File method.str
Author unknown
Since unknown
 

Returns the access of this method.Must be implemented by subclasses.


type Method object -> Access Modifier

 
ATerm get-canonical-name
File method.str
Author unknown
Since unknown
 

Return name that uniquely identifiers a method.

Note that the JLS does not define canonical names for methods.We just use the same terminology for this unique method name, toavoid another kind of name.


todo Include type parameters one way or another?

 
ATerm get-formal-parameter-types-in-class(ATerm inclass)
File method.str
Author unknown
Since unknown
 
Parameters
ATerm inclass Class Object

Returns the formal parameter types of this method if this method is invoked as a member of the given class.

If the method is not actually a member of the specified class, then this strategy will fail.


type Method Object -> List(Type)

 
ATerm get-formal-parameter-types-in-type(ATerm intype)
File method.str
Author unknown
Since unknown
 
Parameters
ATerm intype Type

Returns the formal parameter types of this method if this method is invokedas a member of the given type.

If the method is not actually a member of the specified type, then this strategy will fail.


type Method Object -> List(Type)

 
ATerm get-formal-type-parameter(ATerm name)
File method.str
Author unknown
Since unknown
 
Parameters
ATerm name Simple name of the type parameter (String)

Returns the type parameter of the given name, or failsif this class thus have a type parameter with this name.


type Method Object -> TypeParam

 
ATerm get-formal-type-parameters
File method.str
Author unknown
Since unknown
 

Abstract method. Has to declared in subclasses.


type Method Object -> List(TypeParam)

 
ATerm get-member-type-in-class-helper(Strategy declaredgetter, Strategy resultgetter, Strategy typegetter, ATerm inclass)
File method.str
Author unknown
Since unknown
 

OMG!



 
ATerm get-member-type-in-type-helper(Strategy getter, ATerm intype)
File method.str
Author unknown
Since unknown
 

No information available.


todo Reuse define-substition.
todo Raw types and type erasure.
todo Check the bound
todo Does zip check that the number of arguments are equal?

 
ATerm get-name
File method.str
Author unknown
Since unknown
 

Returns the MethodName of this method.

Note that a MethodName not uniquely identifies a method(i.e. a different method can have the same name).


type Method Object -> MethodName

 
ATerm get-return-type-in-class(ATerm inclass)
File method.str
Author unknown
Since unknown
 
Parameters
ATerm inclass Class Object

Returns the return type of this method if this method is invokedas a member of the given class.

If the method is not actually a member of the specified class, then this strategy will fail.



 
ATerm get-return-type-in-type(ATerm intype)
File method.str
Author unknown
Since unknown
 
Parameters
ATerm intype Type

Returns the return type of this method if this method is invokedas a member of the given type.

If the method is not actually a member of the specified type, then this strategy will fail.



 
ATerm has-formal-type-parameter(ATerm name)
File method.str
Author unknown
Since unknown
 
Parameters
ATerm name Simple name of the type parameter (String)

Succeeds if this class has a type parameter of the given name.


type Method Object -> TypeParam

 
ATerm instanceof-JavaMember
File method.str
Author unknown
Since unknown
 

Every Java method is a Java member.



 
ATerm instanceof-JavaMethod
File method.str
Author unknown
Since unknown
 

Checks if current term is an instance of JavaClass.

Subclasses of method implement this strategy.



 
ATerm is-fixed-arity-method
File method.str
Author unknown
Since unknown
 

Succeeds if this method does not take a variable number of arguments.



 
ATerm is-generic
File method.str
Author unknown
Since unknown
 

Succeeds if this is a generic method (i.e. has formal type parameters).