aboutsummaryrefslogtreecommitdiffstats
path: root/ajdoc/src
diff options
context:
space:
mode:
Diffstat (limited to 'ajdoc/src')
-rw-r--r--ajdoc/src/main/java/org/aspectj/tools/ajdoc/HtmlDecorator.java26
-rw-r--r--ajdoc/src/main/java/org/aspectj/tools/ajdoc/Main.java2
-rw-r--r--ajdoc/src/main/java/org/aspectj/tools/ajdoc/StructureUtil.java2
3 files changed, 15 insertions, 15 deletions
diff --git a/ajdoc/src/main/java/org/aspectj/tools/ajdoc/HtmlDecorator.java b/ajdoc/src/main/java/org/aspectj/tools/ajdoc/HtmlDecorator.java
index 8d36a2433..3f34d1b3d 100644
--- a/ajdoc/src/main/java/org/aspectj/tools/ajdoc/HtmlDecorator.java
+++ b/ajdoc/src/main/java/org/aspectj/tools/ajdoc/HtmlDecorator.java
@@ -168,7 +168,7 @@ class HtmlDecorator {
System.out.println("> Decorating " + file.getCanonicalPath() + "...");
BufferedReader reader = new BufferedReader(new FileReader(file));
- StringBuffer fileContents = new StringBuffer();
+ StringBuilder fileContents = new StringBuilder();
String line = reader.readLine();
while (line != null) {
fileContents.append(line + "\n");
@@ -283,7 +283,7 @@ class HtmlDecorator {
String name = decl.toSignatureString();
int classEndIndex = contents.indexOf(name + "</B><DT>");
if (classEndIndex != -1) {
- StringBuffer sb = new StringBuffer(contents.substring(secondClassStartIndex, classEndIndex));
+ StringBuilder sb = new StringBuilder(contents.substring(secondClassStartIndex, classEndIndex));
sb.replace(0, 5, "aspect");
fileContents.delete(secondClassStartIndex, classEndIndex);
fileContents.insert(secondClassStartIndex, sb.toString());
@@ -327,7 +327,7 @@ class HtmlDecorator {
fos.close();
}
- static void addAspectDocumentation(IProgramElement node, StringBuffer fileBuffer, int index) {
+ static void addAspectDocumentation(IProgramElement node, StringBuilder fileBuffer, int index) {
List<IProgramElement> pointcuts = new ArrayList<>();
List<IProgramElement> advice = new ArrayList<>();
List<IProgramElement> declares = new ArrayList<>();
@@ -381,7 +381,7 @@ class HtmlDecorator {
}
}
- static void insertDeclarationsSummary(StringBuffer fileBuffer, List decls, String kind, int index) {
+ static void insertDeclarationsSummary(StringBuilder fileBuffer, List decls, String kind, int index) {
if (!declsAboveVisibilityExist(decls))
return;
@@ -479,7 +479,7 @@ class HtmlDecorator {
}
}
- static void insertDeclarationsDetails(StringBuffer fileBuffer, List decls, String kind, int index) {
+ static void insertDeclarationsDetails(StringBuilder fileBuffer, List decls, String kind, int index) {
if (!declsAboveVisibilityExist(decls))
return;
int insertIndex = findDetailsIndex(fileBuffer, index);
@@ -535,7 +535,7 @@ class HtmlDecorator {
/**
* TODO: don't place the summary first.
*/
- static int findSummaryIndex(StringBuffer fileBuffer, int index) {
+ static int findSummaryIndex(StringBuilder fileBuffer, int index) {
String fbs = fileBuffer.toString();
String MARKER_1 = "<!-- =========== FIELD SUMMARY =========== -->";
String MARKER_2 = "<!-- ======== CONSTRUCTOR SUMMARY ======== -->";
@@ -550,7 +550,7 @@ class HtmlDecorator {
}
}
- static int findDetailsIndex(StringBuffer fileBuffer, int index) {
+ static int findDetailsIndex(StringBuilder fileBuffer, int index) {
String fbs = fileBuffer.toString();
String MARKER_1 = "<!-- ========= CONSTRUCTOR DETAIL ======== -->";
String MARKER_2 = "<!-- ============ FIELD DETAIL =========== -->";
@@ -569,7 +569,7 @@ class HtmlDecorator {
}
}
- static void decorateDocWithRel(IProgramElement node, StringBuffer fileContentsBuffer, int index, List targets,
+ static void decorateDocWithRel(IProgramElement node, StringBuilder fileContentsBuffer, int index, List targets,
HtmlRelationshipKind relKind) {
if (targets != null && !targets.isEmpty()) {
String adviceDoc = "<TABLE WIDTH=\"100%\" BGCOLOR=#FFFFFF><TR>"
@@ -618,7 +618,7 @@ class HtmlDecorator {
parent = parent.getParent();
names.add(parent.toLinkLabelString());
}
- StringBuffer sbuff = new StringBuffer();
+ StringBuilder sbuff = new StringBuilder();
for (int i = names.size() - 1; i >= 0; i--) {
String element = (String) names.get(i);
if (i == 0) {
@@ -634,7 +634,7 @@ class HtmlDecorator {
// need to replace " with quot; otherwise the links wont work
// for 'matches declare' relationship
- StringBuffer sb = new StringBuffer(currDecl.toLabelString());
+ StringBuilder sb = new StringBuilder(currDecl.toLabelString());
int nextQuote = sb.toString().indexOf("\"");
while (nextQuote != -1) {
sb.deleteCharAt(nextQuote);
@@ -656,7 +656,7 @@ class HtmlDecorator {
}
}
- static void decorateMemberDocumentation(IProgramElement node, StringBuffer fileContentsBuffer, int index) {
+ static void decorateMemberDocumentation(IProgramElement node, StringBuilder fileContentsBuffer, int index) {
List<String> targets = StructureUtil.getTargets(node, IRelationship.Kind.ADVICE);
decorateDocWithRel(node, fileContentsBuffer, index, targets, HtmlRelationshipKind.ADVISED_BY);
@@ -778,7 +778,7 @@ class HtmlDecorator {
* @return String consisting of multiple "../" parts, one for each component part of the input <code>packagePath</code>.
*/
private static String getRelativePathFromHere(String packagePath) {
- StringBuffer result = new StringBuffer("");
+ StringBuilder result = new StringBuilder("");
if (packagePath != null && (packagePath.contains("/"))) {
StringTokenizer sTok = new StringTokenizer(packagePath, "/", false);
while (sTok.hasMoreTokens()) {
@@ -839,7 +839,7 @@ class HtmlDecorator {
}
static String generateHREFName(IProgramElement decl) {
- StringBuffer hrefLinkBuffer = new StringBuffer();
+ StringBuilder hrefLinkBuffer = new StringBuilder();
char[] declChars = decl.toLabelString().toCharArray();
for (char declChar : declChars) {
if (declChar == '"') {
diff --git a/ajdoc/src/main/java/org/aspectj/tools/ajdoc/Main.java b/ajdoc/src/main/java/org/aspectj/tools/ajdoc/Main.java
index 763a5f5d2..313c1af3b 100644
--- a/ajdoc/src/main/java/org/aspectj/tools/ajdoc/Main.java
+++ b/ajdoc/src/main/java/org/aspectj/tools/ajdoc/Main.java
@@ -334,7 +334,7 @@ public class Main implements Config {
if (indexFile.exists()) {
BufferedReader indexFileReader = new BufferedReader(new FileReader(indexFile));
// StringBuffer greatly reduces the time it takes to remove generated tags
- StringBuffer indexFileBuffer = new StringBuffer((int) indexFile.length());
+ StringBuilder indexFileBuffer = new StringBuilder((int) indexFile.length());
String line = indexFileReader.readLine();
while (line != null) {
int indexStart = line.indexOf(Config.DECL_ID_STRING);
diff --git a/ajdoc/src/main/java/org/aspectj/tools/ajdoc/StructureUtil.java b/ajdoc/src/main/java/org/aspectj/tools/ajdoc/StructureUtil.java
index b615078ba..a6490bd52 100644
--- a/ajdoc/src/main/java/org/aspectj/tools/ajdoc/StructureUtil.java
+++ b/ajdoc/src/main/java/org/aspectj/tools/ajdoc/StructureUtil.java
@@ -112,7 +112,7 @@ public class StructureUtil {
}
public static String genSignature(IProgramElement node) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
String accessibility = node.getAccessibility().toString();
if (!accessibility.equals("package")) {