constructor

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

Abstract Java constructor




Statistics


General
Lines of code 89
Stratego
Module number 1 (100% documented)
Constructor number 0
Overlay number 0
Strategy number 7 (100% documented)
Rule number 0
DynamicRule number 0



Strategy summary


get-canonical-name Return name that uniquely identifiers a constructor constructor.str
get-formal-parameter-types-in-class(ATerm inclass) n/a constructor.str
get-formal-parameter-types-in-type(ATerm intype) Returns the formal parameter types of this constructor if this constructor is invoked as a member of the given type constructor.str
get-name Returns the ConstructorName of this method constructor.str
instanceof-JavaConstructor Succeeds if the current term is an instance of a Java constructor constructor.str
instanceof-JavaMember Every Java constructor is a Java member constructor.str
is-fixed-arity-constructor Succeeds if this constructor does not take a variable number of arguments constructor.str



Strategy details


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

Return name that uniquely identifiers a constructor.

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


todo Include type parameters one way or another?

 
ATerm get-formal-parameter-types-in-class(ATerm inclass)
File constructor.str
Author unknown
Since unknown
 

No information available.


todo This method is rather useless. Should it be there?

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

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

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


todo Raw types and type erasure.

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

Returns the ConstructorName of this method.


todo Hacky: introduce a ConstructorName.
type Constructor Object -> ConstructorName

 
ATerm instanceof-JavaConstructor
File constructor.str
Author unknown
Since unknown
 

Succeeds if the current term is an instance of a Java constructor.

Subclasses of Java constructor implement this strategy.



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

Every Java constructor is a Java member.



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

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