public class BindingTypePattern extends ExactTypePattern implements BindingPattern
TypePattern.MatchKindboxedPrimitivesMap, checked, isVoid, primitiveTypesMap, resolvedType, typeAND, 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, WILDend, sourceContext, start| Constructor and Description |
|---|
BindingTypePattern(FormalBinding binding,
boolean isVarArgs) |
BindingTypePattern(UnresolvedType type,
int index,
boolean isVarArgs) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getBindingName() |
int |
getFormalIndex() |
int |
hashCode() |
TypePattern |
parameterizeWith(java.util.Map<java.lang.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 TypePattern |
read(VersionedDataInputStream s,
ISourceContext context) |
TypePattern |
remapAdviceFormals(IntMap bindings)
This is called during concretization of pointcuts, it is used by BindingTypePattern to return a new BindingTypePattern with a
formal index appropiate for the advice, rather than for the lexical declaration, i.e.
|
java.lang.String |
toString() |
void |
write(CompressingDataOutputStream out) |
accept, couldEverMatchSameTypesAs, getResolvedExactType, getType, isArray, isVoid, matchesExactly, matchesExactly, matchesInstanceof, matchesSubtypes, readTypePattern150, readTypePatternOldStyle, resolveBindingsgetAnnotationPattern, getExactType, getTypeParameters, hasFailedResolution, isBangVoid, isEllipsis, isIncludeSubtypes, isStar, isStarAnnotation, isVarArgs, matches, matchesStatically, matchesSubtypes, notExactType, postRead, resolve, resolveExactType, setAnnotationTypePattern, setIsVarArgs, setTypeParameterscopyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, writeLocationclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetEnd, getStartpublic BindingTypePattern(UnresolvedType type, int index, boolean isVarArgs)
public BindingTypePattern(FormalBinding binding, boolean isVarArgs)
public int getFormalIndex()
getFormalIndex in interface BindingPatternpublic java.lang.String getBindingName()
public boolean equals(java.lang.Object other)
equals in class ExactTypePatternpublic int hashCode()
hashCode in class ExactTypePatternpublic void write(CompressingDataOutputStream out) throws java.io.IOException
write in class ExactTypePatternjava.io.IOExceptionpublic static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws java.io.IOException
java.io.IOExceptionpublic TypePattern remapAdviceFormals(IntMap bindings)
TypePattern
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)
remapAdviceFormals in class TypePatternpublic TypePattern parameterizeWith(java.util.Map<java.lang.String,UnresolvedType> typeVariableMap, World w)
ExactTypePatternparameterizeWith in class ExactTypePatternpublic java.lang.String toString()
toString in class ExactTypePattern