} else {
boolean runtimeTest = advice.hasDynamicTests();
String joinPointDescription = shadow.toString();
- msg = WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ADVISES, new String[] { joinPointDescription,
- advisedType, beautifyLocation(shadow.getSourceLocation()), description, advisingType,
- beautifyLocation(munger.getSourceLocation()), (runtimeTest ? " [with runtime test]" : "") }, advisedType,
- advisingType);
+ msg = WeaveMessage
+ .constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ADVISES,
+ new String[] { joinPointDescription, advisedType, beautifyLocation(shadow.getSourceLocation()),
+ description, advisingType, beautifyLocation(munger.getSourceLocation()),
+ (runtimeTest ? " [with runtime test]" : "") }, advisedType, advisingType);
// Boolean.toString(runtimeTest)});
}
getMessageHandler().handleMessage(msg);
if (jc.isGeneric() && isInJava5Mode()) {
nameTypeX = ReferenceType.fromTypeX(UnresolvedType.forRawTypeName(jc.getClassName()), this);
ret = buildBcelDelegate(nameTypeX, jc, artificial, true);
- ReferenceType genericRefType = new ReferenceType(UnresolvedType.forGenericTypeSignature(signature, ret
- .getDeclaredGenericSignature()), this);
+ ReferenceType genericRefType = new ReferenceType(UnresolvedType.forGenericTypeSignature(signature,
+ ret.getDeclaredGenericSignature()), this);
nameTypeX.setDelegate(ret);
genericRefType.setDelegate(ret);
nameTypeX.setGenericType(genericRefType);
if (jc.isGeneric() && isInJava5Mode()) {
nameTypeX = ReferenceType.fromTypeX(UnresolvedType.forRawTypeName(jc.getClassName()), this);
ret = buildBcelDelegate(nameTypeX, jc, artificial, true);
- ReferenceType genericRefType = new ReferenceType(UnresolvedType.forGenericTypeSignature(signature, ret
- .getDeclaredGenericSignature()), this);
+ ReferenceType genericRefType = new ReferenceType(UnresolvedType.forGenericTypeSignature(signature,
+ ret.getDeclaredGenericSignature()), this);
nameTypeX.setDelegate(ret);
genericRefType.setDelegate(ret);
nameTypeX.setGenericType(genericRefType);
public static Member makeFieldJoinPointSignature(LazyClassGen cg, FieldInstruction fi) {
ConstantPool cpg = cg.getConstantPool();
return MemberImpl.field(fi.getClassName(cpg),
- (fi.opcode == Constants.GETSTATIC || fi.opcode == Constants.PUTSTATIC) ? Modifier.STATIC : 0, fi.getName(cpg), fi
- .getSignature(cpg));
+ (fi.opcode == Constants.GETSTATIC || fi.opcode == Constants.PUTSTATIC) ? Modifier.STATIC : 0, fi.getName(cpg),
+ fi.getSignature(cpg));
}
public Member makeJoinPointSignatureFromMethod(LazyMethodGen mg, MemberKind kind) {
if (mg.getEnclosingClass().isInterface()) {
mods |= Modifier.INTERFACE;
}
- return new ResolvedMemberImpl(kind, UnresolvedType.forName(mg.getClassName()), mods, fromBcel(mg.getReturnType()), mg
- .getName(), fromBcel(mg.getArgumentTypes()));
+ return new ResolvedMemberImpl(kind, UnresolvedType.forName(mg.getClassName()), mods, fromBcel(mg.getReturnType()),
+ mg.getName(), fromBcel(mg.getArgumentTypes()));
} else {
return ret;
}
*/
private boolean applyDeclareParents(DeclareParents p, ResolvedType onType) {
boolean didSomething = false;
- List newParents = p.findMatchingNewParents(onType, true);
+ List<ResolvedType> newParents = p.findMatchingNewParents(onType, true);
if (!newParents.isEmpty()) {
didSomething = true;
BcelObjectType classType = BcelWorld.getBcelObjectType(onType);
// System.err.println("need to do declare parents for: " + onType);
- for (Iterator j = newParents.iterator(); j.hasNext();) {
- ResolvedType newParent = (ResolvedType) j.next();
+ for (ResolvedType newParent : newParents) {
// We set it here so that the imminent matching for ITDs can
// succeed - we
}
// Still first pass - apply all dec @type mungers
- for (Iterator i = getCrosscuttingMembersSet().getDeclareAnnotationOnTypes().iterator(); i.hasNext();) {
- DeclareAnnotation decA = (DeclareAnnotation) i.next();
+ for (DeclareAnnotation decA : getCrosscuttingMembersSet().getDeclareAnnotationOnTypes()) {
boolean typeChanged = applyDeclareAtType(decA, onType, true);
if (typeChanged) {
anAnnotationChangeOccurred = true;