Package org.aspectj.weaver.patterns
Klasse TypePattern
java.lang.Object
org.aspectj.weaver.patterns.PatternNode
org.aspectj.weaver.patterns.TypePattern
- Alle implementierten Schnittstellen:
IHasPosition
,IHasSourceLocation
- Bekannte direkte Unterklassen:
AndTypePattern
,AnyTypePattern
,AnyWithAnnotationTypePattern
,EllipsisTypePattern
,ExactTypePattern
,HasMemberTypePattern
,NotTypePattern
,NoTypePattern
,OrTypePattern
,TypeCategoryTypePattern
,WildTypePattern
On creation, type pattern only contains WildTypePattern nodes, not BindingType or ExactType.
Then we call resolveBindings() during compilation During concretization of enclosing pointcuts, we call remapAdviceFormals
- Autor:
- Erik Hilsdale, Jim Hugunin
-
Verschachtelte Klassen - Übersicht
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final byte
protected AnnotationTypePattern
static final TypePattern
static final byte
static final byte
static final byte
static final TypePattern.MatchKind
static final TypePattern
static final byte
static final byte
static final byte
protected boolean
protected boolean
static final TypePattern
static final byte
static final byte
static final byte
static final TypePattern.MatchKind
static final byte
protected TypePatternList
static final byte
Von Klasse geerbte Felder org.aspectj.weaver.patterns.PatternNode
end, sourceContext, start
-
Konstruktorübersicht
ModifiziererKonstruktorBeschreibungprotected
TypePattern
(boolean includeSubtypes) protected
TypePattern
(boolean includeSubtypes, boolean isVarArgs) protected
TypePattern
(boolean includeSubtypes, boolean isVarArgs, TypePatternList typeParams) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected boolean
int
boolean
boolean
isArray()
boolean
For quickly recognizing the pattern '!boolean
boolean
boolean
isStar()
boolean
boolean
boolean
isVoid()
for quickly recognizing the pattern 'void'final FuzzyBoolean
matches
(ResolvedType type, TypePattern.MatchKind kind) protected abstract boolean
matchesArray
(UnresolvedType type) protected abstract boolean
matchesExactly
(ResolvedType type) protected abstract boolean
matchesExactly
(ResolvedType type, ResolvedType annotatedType) abstract FuzzyBoolean
boolean
protected boolean
matchesSubtypes
(ResolvedType type) protected boolean
matchesSubtypes
(ResolvedType superType, ResolvedType annotatedType) protected TypePattern
abstract TypePattern
parameterizeWith
(Map<String, UnresolvedType> typeVariableMap, World w) return a version of this type pattern in which all type variable references have been replaced by their corresponding entry in the map.void
postRead
(ResolvedType enclosingType) static TypePattern
read
(VersionedDataInputStream s, ISourceContext context) remapAdviceFormals
(IntMap bindings) This is called during concretization of pointcuts, it is used by BindingTypePattern to return a new BindingTypePattern with a formal index appropriate for the advice, rather than for the lexical declaration, i.e. this handles transformations through named pointcuts.void
resolveBindings
(IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) This can modify in place, or return a new TypePattern if the type changes.resolveExactType
(IScope scope, Bindings bindings) void
void
setIsVarArgs
(boolean isVarArgs) void
setTypeParameters
(TypePatternList typeParams) Von Klasse geerbte Methoden org.aspectj.weaver.patterns.PatternNode
accept, copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, write, writeLocation
-
Felddetails
-
STATIC
-
DYNAMIC
-
ELLIPSIS
-
ANY
-
NO
-
includeSubtypes
protected boolean includeSubtypes -
isVarArgs
protected boolean isVarArgs -
annotationPattern
-
typeParameters
-
WILD
public static final byte WILD- Siehe auch:
-
EXACT
public static final byte EXACT- Siehe auch:
-
BINDING
public static final byte BINDING- Siehe auch:
-
ELLIPSIS_KEY
public static final byte ELLIPSIS_KEY- Siehe auch:
-
ANY_KEY
public static final byte ANY_KEY- Siehe auch:
-
NOT
public static final byte NOT- Siehe auch:
-
OR
public static final byte OR- Siehe auch:
-
AND
public static final byte AND- Siehe auch:
-
NO_KEY
public static final byte NO_KEY- Siehe auch:
-
ANY_WITH_ANNO
public static final byte ANY_WITH_ANNO- Siehe auch:
-
HAS_MEMBER
public static final byte HAS_MEMBER- Siehe auch:
-
TYPE_CATEGORY
public static final byte TYPE_CATEGORY- Siehe auch:
-
-
Konstruktordetails
-
TypePattern
-
TypePattern
protected TypePattern(boolean includeSubtypes, boolean isVarArgs) -
TypePattern
protected TypePattern(boolean includeSubtypes)
-
-
Methodendetails
-
getAnnotationPattern
-
isVarArgs
public boolean isVarArgs() -
isStarAnnotation
public boolean isStarAnnotation() -
isArray
public boolean isArray() -
getDimensions
public int getDimensions() -
setAnnotationTypePattern
-
setTypeParameters
-
getTypeParameters
-
setIsVarArgs
public void setIsVarArgs(boolean isVarArgs) -
couldEverMatchSameTypesAs
-
matchesStatically
-
matchesInstanceof
-
matches
-
matchesExactly
-
matchesExactly
-
matchesArray
-
matchesSubtypes
-
matchesSubtypes
-
resolveExactType
-
getExactType
-
notExactType
-
resolveBindings
public TypePattern resolveBindings(IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) This can modify in place, or return a new TypePattern if the type changes. -
resolve
-
parameterizeWith
return a version of this type pattern in which all type variable references have been replaced by their corresponding entry in the map. -
postRead
-
isEllipsis
public boolean isEllipsis() -
isStar
public boolean isStar() -
remapAdviceFormals
This is called during concretization of pointcuts, it is used by BindingTypePattern to return a new BindingTypePattern with a formal index appropriate for the advice, rather than for the lexical declaration, i.e. this handles transformations through named pointcuts.pointcut foo(String name): args(name); --> This makes a BindingTypePattern(0) pointing to the 0th formal before(Foo f, String n): this(f) && foo(n) { ... } --> when resolveReferences is called on the args from the above, it will return a BindingTypePattern(1) before(Foo f): this(f) && foo(*) { ... } --> when resolveReferences is called on the args from the above, it will return an ExactTypePattern(String)
-
read
public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException - Löst aus:
IOException
-
isIncludeSubtypes
public boolean isIncludeSubtypes() -
isBangVoid
public boolean isBangVoid()For quickly recognizing the pattern '!void' -
isVoid
public boolean isVoid()for quickly recognizing the pattern 'void' -
hasFailedResolution
public boolean hasFailedResolution()
-