Package org.aspectj.weaver
Class Checker
java.lang.Object
org.aspectj.weaver.ShadowMunger
org.aspectj.weaver.Checker
- All Implemented Interfaces:
PartialOrder.PartialComparable
,IHasPosition
Representation of a shadow munger for a declare error or warning declaration.
- Author:
- Andy Clement
-
Field Summary
Fields inherited from class org.aspectj.weaver.ShadowMunger
end, handle, NONE, pointcut, ShadowMungerAdvice, ShadowMungerDeow, sourceContext, start
-
Constructor Summary
ConstructorDescriptionChecker
(DeclareErrorOrWarning deow) Create a Checker for a declare error or declare warning. -
Method Summary
Modifier and TypeMethodDescriptionint
concretize
(ResolvedType theAspect, World world, PerClause clause) Concretize this Checker by concretizing the pointcutboolean
getMessage
(Shadow shadow) int
hashCode()
boolean
implementOn
(Shadow shadow) Implement this munger at the specified shadow, returning a boolean to indicate success.boolean
isError()
boolean
Determine if the Checker matches at a shadow.boolean
Does the munger have to check that its exception are accepted by the shadow ? It is not the case for annotation style around advice, for example: that can throw Throwable, even if the advised method does not throw any exceptions.parameterizeWith
(ResolvedType declaringType, Map<String, UnresolvedType> typeVariableMap) Parameterize the Checker by parameterizing the pointcutvoid
specializeOn
(Shadow shadow) Methods inherited from class org.aspectj.weaver.ShadowMunger
bindsProceedingJoinPoint, fallbackCompareTo, getBinarySourceLocation, getDeclaringType, getEnd, getPointcut, getSourceLocation, getStart, isAroundAdvice, isBinary, setDeclaringType, setPointcut, write
-
Constructor Details
-
Checker
Create a Checker for a declare error or declare warning.- Parameters:
deow
- the declare error or declare warning for which to create the checker munger
-
-
Method Details
-
isError
public boolean isError() -
getMessage
-
specializeOn
- Specified by:
specializeOn
in classShadowMunger
-
implementOn
Description copied from class:ShadowMunger
Implement this munger at the specified shadow, returning a boolean to indicate success.- Specified by:
implementOn
in classShadowMunger
- Parameters:
shadow
- the shadow where this munger should be applied- Returns:
- true if the implement was successful
-
match
Determine if the Checker matches at a shadow. If it does then we can immediately report the message. Currently, there can never be a non-statically determinable match.- Overrides:
match
in classShadowMunger
- Parameters:
shadow
- the shadow which to match againstworld
- the world through which to access message handlers
-
compareTo
- Returns:
- +1 if this is greater than other
- -1 if this is less than other
- 0 if this is not comparable to other
-
mustCheckExceptions
public boolean mustCheckExceptions()Description copied from class:ShadowMunger
Does the munger have to check that its exception are accepted by the shadow ? It is not the case for annotation style around advice, for example: that can throw Throwable, even if the advised method does not throw any exceptions.- Specified by:
mustCheckExceptions
in classShadowMunger
- Returns:
- true if munger has to check that its exceptions can be thrown based on the shadow
-
getThrownExceptions
- Specified by:
getThrownExceptions
in classShadowMunger
- Returns:
- a Collection of ResolvedTypes for all checked exceptions that might be thrown by this munger
-
equals
-
hashCode
public int hashCode() -
parameterizeWith
public ShadowMunger parameterizeWith(ResolvedType declaringType, Map<String, UnresolvedType> typeVariableMap) Parameterize the Checker by parameterizing the pointcut- Specified by:
parameterizeWith
in classShadowMunger
-
concretize
Concretize this Checker by concretizing the pointcut- Specified by:
concretize
in classShadowMunger
-
getConcreteAspect
- Specified by:
getConcreteAspect
in classShadowMunger
-