mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
StringBuffer -> StringBuilder
This commit is contained in:
@@ -44,7 +44,7 @@ public class ClsAnnotationImpl extends ClsRepositoryPsiElement<PsiAnnotationStub
|
||||
super(stub);
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append("@").append(getReferenceElement().getCanonicalText());
|
||||
((ClsAnnotationParameterListImpl)getParameterList()).appendMirrorText(indentLevel, buffer);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class ClsAnnotationImpl extends ClsRepositoryPsiElement<PsiAnnotationStub
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
final StringBuffer buffer = new StringBuffer();
|
||||
final StringBuilder buffer = new StringBuilder();
|
||||
appendMirrorText(0, buffer);
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public class ClsAnnotationParameterListImpl extends ClsElementImpl implements Ps
|
||||
}
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
if (myAttributes.length != 0) {
|
||||
buffer.append("(");
|
||||
for (int i = 0; i < myAttributes.length; i++) {
|
||||
|
||||
@@ -48,7 +48,7 @@ public abstract class ClsAnnotationValueImpl extends ClsElementImpl implements P
|
||||
|
||||
protected abstract ClsJavaCodeReferenceElementImpl createReference();
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append("@").append(myReferenceElement.getCanonicalText());
|
||||
myParameterList.appendMirrorText(indentLevel, buffer);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public abstract class ClsAnnotationValueImpl extends ClsElementImpl implements P
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
final StringBuffer buffer = new StringBuffer();
|
||||
final StringBuilder buffer = new StringBuilder();
|
||||
appendMirrorText(0, buffer);
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
+2
-2
@@ -35,12 +35,12 @@ public class ClsArrayInitializerMemberValueImpl extends ClsElementImpl implement
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
final StringBuilder buffer = new StringBuilder();
|
||||
appendMirrorText(0, buffer);
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append('{');
|
||||
for (int i = 0; i < myInitializers.length; i++) {
|
||||
if (i > 0) buffer.append(", ");
|
||||
|
||||
@@ -319,7 +319,7 @@ public class ClsClassImpl extends ClsRepositoryPsiElement<PsiClassStub<?>> imple
|
||||
return getStub().isEnum();
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, @NonNls final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, @NonNls final StringBuilder buffer) {
|
||||
ClsDocCommentImpl docComment = (ClsDocCommentImpl)getDocComment();
|
||||
if (docComment != null) {
|
||||
docComment.appendMirrorText(indentLevel, buffer);
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@ public class ClsClassObjectAccessExpressionImpl extends ClsElementImpl implement
|
||||
myTypeElement = new ClsTypeElementImpl(this, canonicalClassText, ClsTypeElementImpl.VARIANCE_NONE);
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
myTypeElement.appendMirrorText(0, buffer);
|
||||
buffer.append(CLASS_ENDING);
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class ClsClassObjectAccessExpressionImpl extends ClsElementImpl implement
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
final StringBuilder buffer = new StringBuilder();
|
||||
appendMirrorText(0, buffer);
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class ClsDocCommentImpl extends ClsElementImpl implements PsiDocComment, JavaTok
|
||||
myTags = tags;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append("/**");
|
||||
for (PsiDocTag tag : getTags()) {
|
||||
goNextLine(indentLevel + 1, buffer);
|
||||
|
||||
@@ -41,7 +41,7 @@ class ClsDocTagImpl extends ClsElementImpl implements PsiDocTag {
|
||||
myNameElement = new NameElement(name);
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append(myNameElement.getText());
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ class ClsDocTagImpl extends ClsElementImpl implements PsiDocTag {
|
||||
return PsiElement.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
}
|
||||
|
||||
public void setMirror(@NotNull TreeElement element) {
|
||||
|
||||
@@ -104,9 +104,9 @@ public abstract class ClsElementImpl extends PsiElementBase implements PsiCompil
|
||||
|
||||
protected static final String CAN_NOT_MODIFY_MESSAGE = PsiBundle.message("psi.error.attempt.to.edit.class.file");
|
||||
|
||||
public abstract void appendMirrorText(final int indentLevel, final StringBuffer buffer);
|
||||
public abstract void appendMirrorText(final int indentLevel, final StringBuilder buffer);
|
||||
|
||||
protected static void goNextLine(int indentLevel, StringBuffer buffer) {
|
||||
protected static void goNextLine(int indentLevel, StringBuilder buffer) {
|
||||
buffer.append('\n');
|
||||
for (int i = 0; i < indentLevel; i++) buffer.append(' ');
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ClsEnumConstantImpl extends ClsFieldImpl implements PsiEnumConstant
|
||||
super(stub);
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
ClsDocCommentImpl docComment = (ClsDocCommentImpl)getDocComment();
|
||||
if (docComment != null) {
|
||||
docComment.appendMirrorText(indentLevel, buffer);
|
||||
|
||||
@@ -183,7 +183,7 @@ public class ClsFieldImpl extends ClsRepositoryPsiElement<PsiFieldStub> implemen
|
||||
public void normalizeDeclaration() throws IncorrectOperationException {
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
ClsDocCommentImpl docComment = (ClsDocCommentImpl)getDocComment();
|
||||
if (docComment != null) {
|
||||
docComment.appendMirrorText(indentLevel, buffer);
|
||||
|
||||
@@ -209,7 +209,7 @@ public class ClsFileImpl extends ClsRepositoryPsiElement<PsiClassHolderFileStub>
|
||||
return false;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append(PsiBundle.message("psi.decompiled.text.header"));
|
||||
goNextLine(indentLevel, buffer);
|
||||
goNextLine(indentLevel, buffer);
|
||||
@@ -358,7 +358,7 @@ public class ClsFileImpl extends ClsRepositoryPsiElement<PsiClassHolderFileStub>
|
||||
psiFile = new ClsFileImpl((PsiManagerImpl)manager, new ClassFileViewProvider(manager, file), true);
|
||||
}
|
||||
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
final StringBuilder buffer = new StringBuilder();
|
||||
psiFile.appendMirrorText(0, buffer);
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class ClsIdentifierImpl extends ClsElementImpl implements PsiIdentifier, PsiJava
|
||||
return myParent;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer){
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer){
|
||||
buffer.append(getText());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -234,7 +234,7 @@ public class ClsJavaCodeReferenceElementImpl extends ClsElementImpl implements P
|
||||
return false;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append(getCanonicalText());
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ClsLiteralExpressionImpl extends ClsElementImpl implements PsiLiter
|
||||
return null;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append(getText());
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ public class ClsMethodImpl extends ClsRepositoryPsiElement<PsiMethodStub> implem
|
||||
return MethodSignatureBackedByPsiMethod.create(this, substitutor);
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
appendMethodHeader(buffer, indentLevel);
|
||||
|
||||
if (hasModifierProperty(PsiModifier.ABSTRACT) || hasModifierProperty(PsiModifier.NATIVE)) {
|
||||
@@ -255,7 +255,7 @@ public class ClsMethodImpl extends ClsRepositoryPsiElement<PsiMethodStub> implem
|
||||
}
|
||||
}
|
||||
|
||||
private void appendMethodHeader(@NonNls StringBuffer buffer, final int indentLevel) {
|
||||
private void appendMethodHeader(@NonNls StringBuilder buffer, final int indentLevel) {
|
||||
ClsDocCommentImpl docComment = (ClsDocCommentImpl)getDocComment();
|
||||
if (docComment != null) {
|
||||
docComment.appendMirrorText(indentLevel, buffer);
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ClsModifierListImpl extends ClsRepositoryPsiElement<PsiModifierList
|
||||
|| element instanceof PsiField;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
final PsiAnnotation[] annotations = getAnnotations();
|
||||
final boolean formattingAllowed = isAnnotationFormattingAllowed();
|
||||
for (PsiAnnotation annotation : annotations) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ClsNameValuePairImpl extends ClsElementImpl implements PsiNameValue
|
||||
myMemberValue = ClsParsingUtil.getMemberValue(value, this);
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
if (myNameIdentifier.getText() != null) {
|
||||
myNameIdentifier.appendMirrorText(0, buffer);
|
||||
buffer.append(" = ");
|
||||
|
||||
@@ -68,7 +68,7 @@ class ClsPackageStatementImpl extends ClsElementImpl implements PsiPackageStatem
|
||||
return myPackageName;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append("package ");
|
||||
buffer.append(getPackageName());
|
||||
buffer.append(";");
|
||||
|
||||
@@ -125,7 +125,7 @@ public class ClsParameterImpl extends ClsRepositoryPsiElement<PsiParameterStub>
|
||||
public void normalizeDeclaration() throws IncorrectOperationException {
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
PsiAnnotation[] annotations = getModifierList().getAnnotations();
|
||||
for (PsiAnnotation annotation : annotations) {
|
||||
((ClsAnnotationImpl)annotation).appendMirrorText(indentLevel, buffer);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ClsParameterListImpl extends ClsRepositoryPsiElement<PsiParameterLi
|
||||
return getParameters().length;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append('(');
|
||||
PsiParameter[] parameters = getParameters();
|
||||
for (int i = 0; i < parameters.length; i++) {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ClsPrefixExpressionImpl extends ClsElementImpl implements PsiPrefix
|
||||
return "-" + myOperand.getText();
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append(getText());
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class ClsPrefixExpressionImpl extends ClsElementImpl implements PsiPrefix
|
||||
return ClsPrefixExpressionImpl.this;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append("-");
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ public class ClsReferenceExpressionImpl extends ClsElementImpl implements PsiRef
|
||||
return false;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
buffer.append(getText());
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ClsReferenceListImpl extends ClsRepositoryPsiElement<PsiClassRefere
|
||||
return getStub().getRole();
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
final String[] names = getStub().getReferencedNames();
|
||||
if (names.length != 0) {
|
||||
final Role role = getStub().getRole();
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class ClsReferenceParametersListImpl extends ClsElementImpl implements Ps
|
||||
myTypeElements = typeElements;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
if (myTypeElements.length != 0) {
|
||||
buffer.append('<');
|
||||
for (int i = 0; i < myTypeElements.length; i++) {
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ClsTypeElementImpl extends ClsElementImpl implements PsiTypeElement
|
||||
return decorateTypeText(myTypeText);
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer){
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer){
|
||||
buffer.append(decorateTypeText(myTypeText));
|
||||
}
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ public class ClsTypeParameterImpl extends ClsRepositoryPsiElement<PsiTypeParamet
|
||||
return "PsiTypeParameter";
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, @NonNls final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, @NonNls final StringBuilder buffer) {
|
||||
buffer.append(getName());
|
||||
PsiJavaCodeReferenceElement[] bounds = getExtendsList().getReferenceElements();
|
||||
if (bounds.length > 0) {
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@ public class ClsTypeParameterReferenceImpl extends ClsElementImpl implements Psi
|
||||
return false;
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer){
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer){
|
||||
buffer.append(getCanonicalText());
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ClsTypeParametersListImpl extends ClsRepositoryPsiElement<PsiTypePa
|
||||
super(stub);
|
||||
}
|
||||
|
||||
public void appendMirrorText(final int indentLevel, final StringBuffer buffer) {
|
||||
public void appendMirrorText(final int indentLevel, final StringBuilder buffer) {
|
||||
final PsiTypeParameter[] params = getTypeParameters();
|
||||
if (params.length != 0) {
|
||||
buffer.append('<');
|
||||
|
||||
Reference in New Issue
Block a user