// can't be Serializable/Cloneable unless -XserializableAspects
if (!world.isXSerializableAspects()) {
- if (world.getWorld().resolve(TypeX.SERIALIZABLE).isAssignableFrom(myType)) {
+ if (world.getWorld().getCoreType(TypeX.SERIALIZABLE).isAssignableFrom(myType)) {
scope.problemReporter().signalError(sourceStart, sourceEnd,
"aspects may not implement Serializable");
ignoreFurtherInvestigation = true;
return;
}
- if (world.getWorld().resolve(TypeX.CLONEABLE).isAssignableFrom(myType)) {
+ if (world.getWorld().getCoreType(TypeX.CLONEABLE).isAssignableFrom(myType)) {
scope.problemReporter().signalError(sourceStart, sourceEnd,
"aspects may not implement Cloneable");
ignoreFurtherInvestigation = true;
}
public ResolvedTypeX getSuperclass() {
- if (binding.isInterface()) return getResolvedTypeX().getWorld().resolve(TypeX.OBJECT);
+ if (binding.isInterface()) return getResolvedTypeX().getWorld().getCoreType(TypeX.OBJECT);
//XXX what about java.lang.Object
return eclipseWorld().fromEclipse(binding.superclass());
}
public final ResolvedTypeX[] getDeclaredInterfaces() {
return
new ResolvedTypeX[] {
- world.resolve(CLONEABLE),
- world.resolve(SERIALIZABLE)
+ world.getCoreType(CLONEABLE),
+ world.getCoreType(SERIALIZABLE)
};
}
public final ResolvedMember[] getDeclaredPointcuts() {
}
public final ResolvedTypeX getSuperclass() {
- return world.resolve(OBJECT);
+ return world.getCoreType(OBJECT);
}
public final boolean isAssignableFrom(TypeX o) {
if (! o.isArray()) return false;
if (!compareToExistingMembers(munger, getMethods())) return;
if (this.isInterface()) {
if (!compareToExistingMembers(munger,
- Arrays.asList(world.resolve(OBJECT).getDeclaredMethods()).iterator())) return;
+ Arrays.asList(world.getCoreType(OBJECT).getDeclaredMethods()).iterator())) return;
}
} else if (sig.getKind() == Member.FIELD) {
if (!compareToExistingMembers(munger, Arrays.asList(getDeclaredFields()).iterator())) return;
Collection ret = new ArrayList();
World world = concreteAspect.getWorld();
- ResolvedTypeX runtimeException = world.resolve(TypeX.RUNTIME_EXCEPTION);
- ResolvedTypeX error = world.resolve(TypeX.ERROR);
+ ResolvedTypeX runtimeException = world.getCoreType(TypeX.RUNTIME_EXCEPTION);
+ ResolvedTypeX error = world.getCoreType(TypeX.ERROR);
for (int i=0, len=excs.length; i < len; i++) {
ResolvedTypeX t = world.resolve(excs[i]);
Constants.INVOKESTATIC));
break;
case 1:
- ((BcelVar)getArgVar(0)).appendLoadAndConvert(il, fact, world.resolve(ResolvedTypeX.OBJECT));
+ ((BcelVar)getArgVar(0)).appendLoadAndConvert(il, fact, world.getCoreType(ResolvedTypeX.OBJECT));
il.append(fact.createInvoke("org.aspectj.runtime.reflect.Factory",
"makeJP", LazyClassGen.tjpType,
new Type[] { LazyClassGen.staticTjpType,
Constants.INVOKESTATIC));
break;
case 2:
- ((BcelVar)getArgVar(0)).appendLoadAndConvert(il, fact, world.resolve(ResolvedTypeX.OBJECT));
- ((BcelVar)getArgVar(1)).appendLoadAndConvert(il, fact, world.resolve(ResolvedTypeX.OBJECT));
+ ((BcelVar)getArgVar(0)).appendLoadAndConvert(il, fact, world.getCoreType(ResolvedTypeX.OBJECT));
+ ((BcelVar)getArgVar(1)).appendLoadAndConvert(il, fact, world.getCoreType(ResolvedTypeX.OBJECT));
il.append(fact.createInvoke("org.aspectj.runtime.reflect.Factory",
"makeJP", LazyClassGen.tjpType,
new Type[] { LazyClassGen.staticTjpType,
Field field = getEnclosingClass().getTjpField(this);
thisJoinPointStaticPartVar =
new BcelFieldRef(
- world.resolve(TypeX.forName("org.aspectj.lang.JoinPoint$StaticPart")),
+ world.getCoreType(TypeX.forName("org.aspectj.lang.JoinPoint$StaticPart")),
getEnclosingClass().getClassName(),
field.getName());
// getEnclosingClass().warnOnAddedStaticInitializer(this,munger.getSourceLocation());
final InstructionFactory fact = getFactory();
BcelVar arrayVar = new BcelVar(
- world.resolve(TypeX.OBJECTARRAY),
+ world.getCoreType(TypeX.OBJECTARRAY),
extractedMethod.allocateLocal(1));
int len = superConstructorTypes.length;
TypeX iType = typePattern.getExactType();
ResolvedTypeX parentType = iType.resolve(world);
- if (targetType.equals(world.resolve(TypeX.OBJECT))) {
+ if (targetType.equals(world.getCoreType(TypeX.OBJECT))) {
world.showMessage(IMessage.ERROR,
WeaverMessages.format(WeaverMessages.DECP_OBJECT),
this.getSourceLocation(), null);
exception = exception.resolveBindings(scope, null, false, true);
TypeX excType = exception.getExactType();
if (excType != ResolvedTypeX.MISSING) {
- if (!scope.getWorld().resolve(TypeX.THROWABLE).isAssignableFrom(excType)) {
+ if (!scope.getWorld().getCoreType(TypeX.THROWABLE).isAssignableFrom(excType)) {
scope.getWorld().showMessage(IMessage.ERROR,
WeaverMessages.format(WeaverMessages.NOT_THROWABLE,excType.getName()),
exception.getSourceLocation(), null);