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
ConstructorsConstructorDescriptionChecker(DeclareErrorOrWarning deow)Create a Checker for a declare error or declare warning. -
Method Summary
Modifier and TypeMethodDescriptionintconcretize(ResolvedType theAspect, World world, PerClause clause)Concretize this Checker by concretizing the pointcutbooleangetMessage(Shadow shadow)inthashCode()booleanimplementOn(Shadow shadow)Implement this munger at the specified shadow, returning a boolean to indicate success.booleanisError()booleanDetermine if the Checker matches at a shadow.booleanDoes 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 pointcutvoidspecializeOn(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:
specializeOnin classShadowMunger
-
implementOn
Description copied from class:ShadowMungerImplement this munger at the specified shadow, returning a boolean to indicate success.- Specified by:
implementOnin 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:
matchin 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:ShadowMungerDoes 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:
mustCheckExceptionsin classShadowMunger- Returns:
- true if munger has to check that its exceptions can be thrown based on the shadow
-
getThrownExceptions
- Specified by:
getThrownExceptionsin 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:
parameterizeWithin classShadowMunger
-
concretize
Concretize this Checker by concretizing the pointcut- Specified by:
concretizein classShadowMunger
-
getConcreteAspect
- Specified by:
getConcreteAspectin classShadowMunger
-