| java.lang.Object ch.ethz.prose.crosscut.SignaturePattern ch.ethz.prose.crosscut.ConstructorCutSignaturePattern
ConstructorCutSignaturePattern | class ConstructorCutSignaturePattern extends SignaturePattern implements Serializable(Code) | | Every Crosscut contains a method to be executed when a join-point is hit.
In the case of ConstructorCut objects, the advice method has three
roles:
- The pattern role: through a special signature, define matches for the
target class, and for the parameters of the constructors belonging to the target.
- The method finder role: determine which method o of the crosscut
must be ivoked upon a hit join-point.
- The optimization role: to cathegorize the signature of the advice
method, such that the subsequent execution of the advice method is efficient.
The categorization is currently performed according to the
SIGNATURE__XXX
constants.
|
Method Summary | |
protected boolean | matchesParameters(Constructor actualConstructor) Returns true if the signature of
constructorObj , seen as a pattern,
matches the signature (the parameter types) for
actualConstructor . | public String | toString() |
ConstructorCutSignaturePattern | protected ConstructorCutSignaturePattern(ConstructorCut crsc) throws MissingInformationException(Code) | | Create an UserDefinedCCSignature that encapsulates the
method to be executed.
Postcondition: methodObj is properly initialized
Implementation:
- if
crsc (i.e., a subclass of FunctionalCrossscut)
defines exaclty one method, this method is
the advice method.
- If
crsc defines several methods, the one whose
name corresponds to crsc.ADVICE_NAME() is the advice method
throws: MissingInformationExeception - crsc does not define a method at all,or if it defines several, none of them matches crsc.ADVICE_NAME() . |
matchesParameters | protected boolean matchesParameters(Constructor actualConstructor)(Code) | | Returns true if the signature of
constructorObj , seen as a pattern,
matches the signature (the parameter types) for
actualConstructor .
|
|
|