Class BindingTypePattern
java.lang.Object
org.aspectj.weaver.patterns.PatternNode
org.aspectj.weaver.patterns.TypePattern
org.aspectj.weaver.patterns.ExactTypePattern
org.aspectj.weaver.patterns.BindingTypePattern
- All Implemented Interfaces:
IHasPosition, IHasSourceLocation, BindingPattern
-
Nested Class Summary
Nested classes/interfaces inherited from class TypePattern
TypePattern.MatchKind -
Field Summary
Fields inherited from class ExactTypePattern
boxedPrimitivesMap, checked, isVoid, primitiveTypesMap, resolvedType, typeFields inherited from class TypePattern
AND, annotationPattern, ANY, ANY_KEY, ANY_WITH_ANNO, BINDING, DYNAMIC, ELLIPSIS, ELLIPSIS_KEY, EXACT, HAS_MEMBER, includeSubtypes, isVarArgs, NO, NO_KEY, NOT, OR, STATIC, TYPE_CATEGORY, typeParameters, WILDModifier and TypeFieldDescriptionstatic final byteprotected AnnotationTypePatternstatic final TypePatternstatic final bytestatic final bytestatic final bytestatic final TypePattern.MatchKindstatic final TypePatternstatic final bytestatic final bytestatic final byteprotected booleanprotected booleanstatic final TypePatternstatic final bytestatic final bytestatic final bytestatic final TypePattern.MatchKindstatic final byteprotected TypePatternListstatic final byteFields inherited from class PatternNode
end, sourceContext, start -
Constructor Summary
ConstructorsConstructorDescriptionBindingTypePattern(FormalBinding binding, boolean isVarArgs) BindingTypePattern(UnresolvedType type, int index, boolean isVarArgs) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintinthashCode()parameterizeWith(Map<String, UnresolvedType> typeVariableMap, World w) return a version of this type pattern with all type variables references replaced by the corresponding entry in the map.static TypePatternread(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.toString()voidMethods inherited from class ExactTypePattern
accept, couldEverMatchSameTypesAs, getDimensions, getResolvedExactType, getType, isArray, isVoid, matchesArray, matchesExactly, matchesExactly, matchesInstanceof, matchesSubtypes, readTypePattern150, readTypePatternOldStyle, resolveBindingsModifier and TypeMethodDescriptionaccept(PatternNodeVisitor visitor, Object data) protected booleanintgetResolvedExactType(World world) getType()booleanisArray()booleanisVoid()for quickly recognizing the pattern 'void'protected booleanmatchesArray(UnresolvedType type) protected booleanmatchesExactly(ResolvedType matchType) protected booleanmatchesExactly(ResolvedType matchType, ResolvedType annotatedType) matchesInstanceof(ResolvedType matchType) protected booleanmatchesSubtypes(ResolvedType type) static TypePatternreadTypePattern150(VersionedDataInputStream s, ISourceContext context) static TypePatternreadTypePatternOldStyle(DataInputStream s, ISourceContext context) resolveBindings(IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) This can modify in place, or return a new TypePattern if the type changes.Methods inherited from class TypePattern
getAnnotationPattern, getExactType, getTypeParameters, hasFailedResolution, isBangVoid, isEllipsis, isIncludeSubtypes, isStar, isStarAnnotation, isVarArgs, matches, matchesStatically, matchesSubtypes, notExactType, postRead, resolve, resolveExactType, setAnnotationTypePattern, setIsVarArgs, setTypeParameters, traverseModifier and TypeMethodDescriptionbooleanbooleanFor quickly recognizing the pattern '!void'booleanbooleanbooleanisStar()booleanbooleanfinal FuzzyBooleanmatches(ResolvedType type, TypePattern.MatchKind kind) booleanprotected booleanmatchesSubtypes(ResolvedType superType, ResolvedType annotatedType) protected TypePatternvoidpostRead(ResolvedType enclosingType) voidresolveExactType(IScope scope, Bindings bindings) voidvoidsetIsVarArgs(boolean isVarArgs) voidsetTypeParameters(TypePatternList typeParams) traverse(PatternNodeVisitor visitor, Object data) Methods inherited from class PatternNode
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, writeLocationModifier and TypeMethodDescriptionvoidcopyLocationFrom(PatternNode other) intgetEnd()The ending index of this location in the character stream This points to the last character in this token.intgetStart()The starting index of this location in the character stream.voidreadLocation(ISourceContext context, DataInputStream s) voidsetLocation(ISourceContext sourceContext, int start, int end) void
-
Constructor Details
-
BindingTypePattern
-
BindingTypePattern
-
-
Method Details
-
getFormalIndex
public int getFormalIndex()- Specified by:
getFormalIndexin interfaceBindingPattern
-
getBindingName
-
equals
- Overrides:
equalsin classExactTypePattern
-
hashCode
public int hashCode()- Overrides:
hashCodein classExactTypePattern
-
write
- Overrides:
writein classExactTypePattern- Throws:
IOException
-
read
public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException - Throws:
IOException
-
remapAdviceFormals
Description copied from class:TypePatternThis 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)- Overrides:
remapAdviceFormalsin classTypePattern
-
parameterizeWith
Description copied from class:ExactTypePatternreturn a version of this type pattern with all type variables references replaced by the corresponding entry in the map.- Overrides:
parameterizeWithin classExactTypePattern
-
toString
- Overrides:
toStringin classExactTypePattern
-