public boolean matches(ResolvedType onType) { // cannot always do the right thing because may need to eagerly generate ajcMightHaveAspect interface for LTW (says Alex) if (hasGeneratedInner) { // pr237419 - not always going to generate the marker interface return aspectType.equals(onType); } else { return true; } }
public boolean equals(Object other) { if (!(other instanceof Slot)) { return false; } Slot o = (Slot) other; return o.formalIndex == this.formalIndex && o.arrayIndex == this.arrayIndex && o.formalType.equals(this.formalType); }
/** * Match only the aspect for which we act */ @Override public boolean matches(ResolvedType onType) { return aspectType.equals(onType); }
public boolean equals(Object other) { if (!(other instanceof NewParentTypeMunger)) { return false; } NewParentTypeMunger o = (NewParentTypeMunger) other; return newParent.equals(o.newParent) && isMixin == o.isMixin; }
public boolean equals(Object other) { if (!(other instanceof Question)) return false; Question o = (Question)other; return o.pattern.equals(pattern) && o.type.equals(type) && o.kind == kind; }
@Override public boolean equals(Object other) { if (!(other instanceof PerTypeWithin)) { return false; } PerTypeWithin pc = (PerTypeWithin) other; return ((pc.inAspect == null) ? (inAspect == null) : pc.inAspect.equals(inAspect)) && ((pc.typePattern == null) ? (typePattern == null) : pc.typePattern.equals(typePattern)); }
public boolean equals(Object other) { if (other instanceof HasAnnotation) { HasAnnotation o = (HasAnnotation) other; return o.v.equals(v) && o.annType.equals(annType); } else { return false; } }
public boolean equals(Object other) { if (!(other instanceof PerFromSuper)) { return false; } PerFromSuper pc = (PerFromSuper) other; return pc.kind.equals(kind) && ((pc.inAspect == null) ? (inAspect == null) : pc.inAspect.equals(inAspect)); }
public boolean equals(Object other) { if (!(other instanceof PerObject)) { return false; } PerObject pc = (PerObject) other; return (pc.isThis && isThis) && ((pc.inAspect == null) ? (inAspect == null) : pc.inAspect.equals(inAspect)) && ((pc.entry == null) ? (entry == null) : pc.entry.equals(entry)); }
@Override public boolean equals(Object other) { if (!(other instanceof CacheKey)) { return false; } CacheKey oCacheKey = (CacheKey) other; return key.equals(oCacheKey.key) && annotationType.equals(oCacheKey.annotationType); } }
@Override public boolean hasAnnotation(UnresolvedType ofType) { ensureAnnotationsRetrieved(); for (ResolvedType aType : annotationTypes) { if (aType.equals(ofType)) { return true; } } return false; }
@Override public boolean hasAnnotation(UnresolvedType ofType) { ensureAnnotationTypesRetrieved(); for (ResolvedType aType : annotationTypes) { if (aType.equals(ofType)) { return true; } } return false; }
public AnnotationAJ getAnnotationOfType(UnresolvedType ofType) { if (annotations!=null) { // this means they have been set (we are likely a placeholder for an ITD, so a fake member) for (AnnotationAJ annotation: annotations) { if (annotation.getType().equals(ofType)) { return annotation; } } return null; } throw new UnsupportedOperationException("You should resolve this member and call getAnnotationOfType() on the result..."); }
public boolean hasAnnotation(UnresolvedType ofType) { boolean onDelegate = getDelegate().hasAnnotation(ofType); if (onDelegate) { return true; } if (annotationTypes != null) { for (int i = 0; i < annotationTypes.length; i++) { if (annotationTypes[i].equals(ofType)) { return true; } } } return false; }
public final boolean isCoerceableFrom(ResolvedType o) { if (o.equals(UnresolvedType.OBJECT) || o.equals(UnresolvedType.SERIALIZABLE) || o.equals(UnresolvedType.CLONEABLE)) { return true; } if (!o.isArray()) return false; if (o.getComponentType().isPrimitiveType()) { return o.equals(this); } else { return getComponentType().resolve(world).isCoerceableFrom(o.getComponentType().resolve(world)); } }
/** * Reference types we don't intend to weave may be ejected from the cache if we need the space. */ protected boolean isExpendable(ResolvedType type) { return !type.equals(UnresolvedType.OBJECT) && !type.isExposedToWeaver() && !type.isPrimitiveType() && !type.isPrimitiveArray(); }
public boolean munge(BcelClassWeaver weaver) { LazyClassGen gen = weaver.getLazyClassGen(); doAggressiveInner(gen); // Only munge the aspect type if (!gen.getType().equals(aspectType)) { return false; } return doMunge(gen, true); }
public static Test makeInstanceof(Var v, ResolvedType ty) { if (ty.equals(ResolvedType.OBJECT)) return Literal.TRUE; Test e; if (ty.isAssignableFrom(v.getType())) e = Literal.TRUE; else if (! ty.isCoerceableFrom(v.getType())) e = Literal.FALSE; else e = new Instanceof(v, ty); return e; }
public boolean isVisible(ResolvedType fromType) { UnresolvedType declaringType = getDeclaringType(); ResolvedType type = null; if (fromType.equals(declaringType)) { type = fromType; } else { World world = fromType.getWorld(); type = declaringType.resolve(world); } return ResolvedType.isVisible(getModifiers(), type, fromType); }
public final boolean isAssignableFrom(ResolvedType o) { if (!o.isArray()) return false; if (o.getComponentType().isPrimitiveType()) { return o.equals(this); } else { return getComponentType().resolve(world).isAssignableFrom(o.getComponentType().resolve(world)); } }