4dc7b558
(01Dec2023)
Mostly StringBuffer -> StringBuilder API changes Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>tags/V1_9_21_RC1
AspectDeclaration aspectDecl = (AspectDeclaration) typeDec; | AspectDeclaration aspectDecl = (AspectDeclaration) typeDec; | ||||
adviceSequenceNumberInType = aspectDecl.adviceCounter++; | adviceSequenceNumberInType = aspectDecl.adviceCounter++; | ||||
StringBuffer stringifiedPointcut = new StringBuffer(30); | |||||
StringBuilder stringifiedPointcut = new StringBuilder(30); | |||||
pointcutDesignator.print(0, stringifiedPointcut); | pointcutDesignator.print(0, stringifiedPointcut); | ||||
this.selector = NameMangler.adviceName(EclipseFactory.getName(typeDec.binding).replace('.', '_'), kind, | this.selector = NameMangler.adviceName(EclipseFactory.getName(typeDec.binding).replace('.', '_'), kind, | ||||
adviceSequenceNumberInType, stringifiedPointcut.toString().hashCode()).toCharArray(); | adviceSequenceNumberInType, stringifiedPointcut.toString().hashCode()).toCharArray(); | ||||
// return s; | // return s; | ||||
// } | // } | ||||
public StringBuffer printBody(int indent, StringBuffer output) { | |||||
public StringBuilder printBody(int indent, StringBuilder output) { | |||||
output.append(": "); | output.append(": "); | ||||
if (pointcutDesignator != null) { | if (pointcutDesignator != null) { | ||||
output.append(pointcutDesignator.toString()); | output.append(pointcutDesignator.toString()); | ||||
return super.printBody(indent, output); | return super.printBody(indent, output); | ||||
} | } | ||||
public StringBuffer printReturnType(int indent, StringBuffer output) { | |||||
public StringBuilder printReturnType(int indent, StringBuilder output) { | |||||
if (this.kind == AdviceKind.Around) { | if (this.kind == AdviceKind.Around) { | ||||
return super.printReturnType(indent, output); | return super.printReturnType(indent, output); | ||||
} | } |
return finder; | return finder; | ||||
} | } | ||||
public StringBuffer printHeader(int indent, StringBuffer output) { | |||||
public StringBuilder printHeader(int indent, StringBuilder output) { | |||||
// since all aspects are made public we want to print the | // since all aspects are made public we want to print the | ||||
// modifiers that were supplied in the original source code | // modifiers that were supplied in the original source code | ||||
printModifiers(this.declaredModifiers, output); | printModifiers(this.declaredModifiers, output); |
return declareDecl; | return declareDecl; | ||||
} | } | ||||
public StringBuffer print(int tab, StringBuffer output) { | |||||
public StringBuilder print(int tab, StringBuilder output) { | |||||
printIndent(tab, output); | printIndent(tab, output); | ||||
if (declareDecl == null) { | if (declareDecl == null) { | ||||
output.append("<declare>"); | output.append("<declare>"); |
/* | /* | ||||
* (non-Javadoc) | * (non-Javadoc) | ||||
* | * | ||||
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer) | |||||
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuilder) | |||||
*/ | */ | ||||
public StringBuffer print(int indent, StringBuffer output) { | |||||
public StringBuilder print(int indent, StringBuilder output) { | |||||
if (pointcut == null) | if (pointcut == null) | ||||
return output.append("<pcd>"); | return output.append("<pcd>"); | ||||
return output.append(pointcut.toString()); | return output.append(pointcut.toString()); |
} | } | ||||
/* (non-Javadoc) | /* (non-Javadoc) | ||||
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer) | |||||
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuilder) | |||||
*/ | */ | ||||
public StringBuffer print(int indent, StringBuffer output) { | |||||
public StringBuilder print(int indent, StringBuilder output) { | |||||
output.append("PseudoToken<" + getString() + ">"); | output.append("PseudoToken<" + getString() + ">"); | ||||
return output; | return output; | ||||
} | } |
} | } | ||||
/* (non-Javadoc) | /* (non-Javadoc) | ||||
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer) | |||||
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuilder) | |||||
*/ | */ | ||||
public StringBuffer print(int indent, StringBuffer output) { | |||||
public StringBuilder print(int indent, StringBuilder output) { | |||||
output.append(tokenSource.toString()); | output.append(tokenSource.toString()); | ||||
return output; | return output; | ||||
} | } |
} | } | ||||
private String genSourceSignature(TypeDeclaration typeDeclaration) { | private String genSourceSignature(TypeDeclaration typeDeclaration) { | ||||
StringBuffer output = new StringBuffer(); | |||||
StringBuilder output = new StringBuilder(); | |||||
typeDeclaration.printHeader(0, output); | typeDeclaration.printHeader(0, output); | ||||
return output.toString(); | return output.toString(); | ||||
} | } | ||||
} | } | ||||
private String genSourceSignature(MethodDeclaration methodDeclaration) { | private String genSourceSignature(MethodDeclaration methodDeclaration) { | ||||
StringBuffer output = new StringBuffer(); | |||||
StringBuilder output = new StringBuilder(); | |||||
ASTNode.printModifiers(methodDeclaration.modifiers, output); | ASTNode.printModifiers(methodDeclaration.modifiers, output); | ||||
// Append Type Parameters if any | // Append Type Parameters if any | ||||
} | } | ||||
private String genSourceSignature(ImportReference importreference) { | private String genSourceSignature(ImportReference importreference) { | ||||
StringBuffer output = new StringBuffer(); | |||||
StringBuilder output = new StringBuilder(); | |||||
output.append("import "); | output.append("import "); | ||||
ASTNode.printModifiers(importreference.modifiers, output); | ASTNode.printModifiers(importreference.modifiers, output); | ||||
output.append(importreference); | output.append(importreference); | ||||
* | * | ||||
*/ | */ | ||||
protected String genSourceSignature(FieldDeclaration fieldDeclaration) { | protected String genSourceSignature(FieldDeclaration fieldDeclaration) { | ||||
StringBuffer output = new StringBuffer(); | |||||
StringBuilder output = new StringBuilder(); | |||||
if (fieldDeclaration.type == null) { // This is an enum value | if (fieldDeclaration.type == null) { // This is an enum value | ||||
output.append(fieldDeclaration.name); // the "," or ";" has to be | output.append(fieldDeclaration.name); // the "," or ";" has to be | ||||
// put on by whatever uses | // put on by whatever uses | ||||
} | } | ||||
private String genSourceSignature(ConstructorDeclaration constructorDeclaration) { | private String genSourceSignature(ConstructorDeclaration constructorDeclaration) { | ||||
StringBuffer output = new StringBuffer(); | |||||
StringBuilder output = new StringBuilder(); | |||||
ASTNode.printModifiers(constructorDeclaration.modifiers, output); | ASTNode.printModifiers(constructorDeclaration.modifiers, output); | ||||
// Append Type Parameters if any | // Append Type Parameters if any |
compiler.name = AspectJ Compiler | compiler.name = AspectJ Compiler | ||||
compiler.version = Eclipse Compiler c13b03ceabf0c1 (26Nov2023) - Java21 | |||||
compiler.version = Eclipse Compiler 4dc7b558f82274 (01Dec2023) - Java21 | |||||
compiler.copyright = | compiler.copyright = | ||||
misc.version = {0} {1} - {2} {3} | misc.version = {0} {1} - {2} {3} |