Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ast/CodeElement.java @ 7530:5e3d1a68664e
applied mx eclipseformat to all Java files
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 23 Jan 2013 16:34:57 +0100 |
parents | 6343a09b2ec1 |
children | 418635acf875 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ast/CodeElement.java Wed Jan 23 16:34:38 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ast/CodeElement.java Wed Jan 23 16:34:57 2013 +0100 @@ -46,7 +46,6 @@ this.modifiers = new LinkedHashSet<>(); } - @Override public void setGeneratorAnnotationMirror(AnnotationMirror mirror) { this.generatorAnnotationMirror = mirror; @@ -128,8 +127,7 @@ public CodeTypeElement getEnclosingClass() { Element p = enclosingElement; - while (p != null && p.getKind() != ElementKind.CLASS - && p.getKind() != ElementKind.ENUM) { + while (p != null && p.getKind() != ElementKind.CLASS && p.getKind() != ElementKind.ENUM) { p = p.getEnclosingElement(); } return (CodeTypeElement) p; @@ -139,7 +137,6 @@ return new ParentableList<>(parent, list); } - @Override public String toString() { StringBuilderCodeWriter codeWriter = new StringBuilderCodeWriter(); @@ -157,13 +154,13 @@ protected Writer createWriter(CodeTypeElement clazz) throws IOException { return writer; } + public String getString() { return new String(((CharArrayWriter) writer).toCharArray()).trim(); } } - private static class ParentableList<T> implements List<T> { private final Element parent; @@ -234,12 +231,12 @@ } @Override - public boolean containsAll(Collection< ? > c) { + public boolean containsAll(Collection<?> c) { return delegate.containsAll(c); } @Override - public boolean addAll(Collection< ? extends T> c) { + public boolean addAll(Collection<? extends T> c) { if (c != null) { for (T t : c) { addImpl(t); @@ -249,7 +246,7 @@ } @Override - public boolean addAll(int index, Collection< ? extends T> c) { + public boolean addAll(int index, Collection<? extends T> c) { if (c != null) { for (T t : c) { addImpl(t); @@ -259,7 +256,7 @@ } @Override - public boolean removeAll(Collection< ? > c) { + public boolean removeAll(Collection<?> c) { if (c != null) { for (Object t : c) { removeImpl(t); @@ -274,7 +271,7 @@ } @Override - public boolean retainAll(Collection< ? > c) { + public boolean retainAll(Collection<?> c) { throw new UnsupportedOperationException("Not supported by parentable list"); } @@ -338,5 +335,4 @@ } - }