From 72450f4377502992c5a3a9aa626e8ddb7849dc5b Mon Sep 17 00:00:00 2001 From: sotty Date: Fri, 24 Jul 2015 19:19:19 -0500 Subject: [PATCH] [ROASTER-11] Reformat code --- .../model/expressions/AccessBuilder.java | 19 +- .../roaster/model/expressions/Accessor.java | 9 +- .../roaster/model/expressions/Argument.java | 7 +- .../model/expressions/ArgumentHolder.java | 11 +- .../ArrayConstructorExpression.java | 17 +- .../model/expressions/ArrayIndexer.java | 15 +- .../roaster/model/expressions/ArrayInit.java | 17 +- .../model/expressions/AssignExpression.java | 19 +- .../roaster/model/expressions/Assignment.java | 76 +-- .../expressions/BasicExpressionFactory.java | 45 +- .../model/expressions/BooleanLiteral.java | 7 +- .../model/expressions/CastExpression.java | 11 +- .../expressions/ChainableExpression.java | 9 +- .../model/expressions/CharacterLiteral.java | 7 +- .../model/expressions/ClassLiteral.java | 9 +- .../model/expressions/ConstructorBuilder.java | 11 +- .../expressions/ConstructorExpression.java | 11 +- .../model/expressions/DeclareExpression.java | 25 +- .../roaster/model/expressions/Expression.java | 7 +- .../expressions/ExpressionChainLink.java | 9 +- .../model/expressions/ExpressionSource.java | 7 +- .../model/expressions/Expressions.java | 466 ++++++++++-------- .../roaster/model/expressions/Field.java | 11 +- .../roaster/model/expressions/Getter.java | 11 +- .../expressions/InstanceofExpression.java | 11 +- .../roaster/model/expressions/Literal.java | 7 +- .../model/expressions/LiteralBuilder.java | 23 +- .../expressions/MethodCallExpression.java | 7 +- .../expressions/MethodInvokeExpression.java | 17 +- .../MethodWithArgumentsInvokeExpression.java | 9 +- .../expressions/NonPrimitiveExpression.java | 10 +- .../model/expressions/NullLiteral.java | 5 +- .../model/expressions/NumberLiteral.java | 7 +- .../forge/roaster/model/expressions/Op.java | 86 ++-- .../model/expressions/OperatorExpression.java | 13 +- .../model/expressions/OrdinalArgument.java | 17 +- .../model/expressions/ParenExpression.java | 11 +- .../model/expressions/PostFixExpression.java | 5 +- .../roaster/model/expressions/PostfixOp.java | 52 +- .../roaster/model/expressions/PrefixOp.java | 60 ++- .../model/expressions/PrimitiveLiteral.java | 5 +- .../roaster/model/expressions/Setter.java | 9 +- .../model/expressions/StringLiteral.java | 11 +- .../roaster/model/expressions/Super.java | 7 +- .../model/expressions/TernaryExpression.java | 20 +- .../model/expressions/ThisLiteral.java | 11 +- .../model/expressions/UnaryExpression.java | 11 +- .../roaster/model/expressions/Variable.java | 7 +- .../model/statements/AssertStatement.java | 13 +- .../model/statements/AssignmentStatement.java | 17 +- .../model/statements/BlockStatement.java | 7 +- .../roaster/model/statements/BodyHolder.java | 14 +- .../model/statements/BranchingStatement.java | 7 +- .../model/statements/BreakStatement.java | 9 +- .../model/statements/ContinueStatement.java | 9 +- .../statements/ControlFlowStatement.java | 9 +- .../model/statements/DeclareStatement.java | 29 +- .../model/statements/DoWhileStatement.java | 11 +- .../statements/EvalExpressionStatement.java | 9 +- .../model/statements/ExpressionStatement.java | 11 +- .../model/statements/ForEachStatement.java | 19 +- .../model/statements/ForStatement.java | 19 +- .../roaster/model/statements/IfStatement.java | 23 +- .../model/statements/InvokeStatement.java | 17 +- .../model/statements/LoopingStatement.java | 7 +- .../model/statements/ReturnStatement.java | 11 +- .../roaster/model/statements/Statement.java | 17 +- .../model/statements/StatementSource.java | 11 +- .../roaster/model/statements/Statements.java | 266 +++++----- .../model/statements/SuperStatement.java | 9 +- .../model/statements/SwitchCaseStatement.java | 9 +- .../model/statements/SwitchStatement.java | 23 +- .../model/statements/SynchStatement.java | 13 +- .../model/statements/ThisStatement.java | 9 +- .../model/statements/ThrowStatement.java | 9 +- .../model/statements/TryCatchStatement.java | 23 +- .../model/statements/WhileStatement.java | 11 +- 77 files changed, 1028 insertions(+), 870 deletions(-) diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/AccessBuilder.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/AccessBuilder.java index a746e7a4..2a7e5793 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/AccessBuilder.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/AccessBuilder.java @@ -12,21 +12,22 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface AccessBuilder, - P extends ExpressionHolder, - E extends NonPrimitiveExpression> { + P extends ExpressionHolder, + E extends NonPrimitiveExpression> +{ - public Field field( String field ); + public Field field(String field); - public Getter getter( String field, String klass ); + public Getter getter(String field, String klass); - public Getter getter( String field, Class klass ); + public Getter getter(String field, Class klass); - public Setter setter( String fldName, String type, ExpressionSource value ); + public Setter setter(String fldName, String type, ExpressionSource value); - public Setter setter( String fldName, Class type, ExpressionSource value ); + public Setter setter(String fldName, Class type, ExpressionSource value); - public MethodCallExpression invoke( String method ); + public MethodCallExpression invoke(String method); - public ArrayIndexer itemAt( ExpressionSource index ); + public ArrayIndexer itemAt(ExpressionSource index); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Accessor.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Accessor.java index 699099fb..fe0505f5 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Accessor.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Accessor.java @@ -11,9 +11,10 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface Accessor, - P extends ExpressionHolder, - E extends NonPrimitiveExpression> - extends Argument, - AccessBuilder { + P extends ExpressionHolder, + E extends NonPrimitiveExpression> + extends Argument, + AccessBuilder +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Argument.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Argument.java index f6c09871..520bab8b 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Argument.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Argument.java @@ -12,8 +12,9 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface Argument, - P extends ExpressionHolder, - E extends ExpressionSource> - extends ExpressionSource { + P extends ExpressionHolder, + E extends ExpressionSource> + extends ExpressionSource +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArgumentHolder.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArgumentHolder.java index 6d0731ae..0ee28526 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArgumentHolder.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArgumentHolder.java @@ -13,11 +13,12 @@ import java.util.List; public interface ArgumentHolder, - P extends ExpressionHolder, - E extends NonPrimitiveExpression> - extends ExpressionHolder { + P extends ExpressionHolder, + E extends NonPrimitiveExpression> + extends ExpressionHolder +{ - public E addArgument( Argument arg ); + public E addArgument(Argument arg); - public List> getArguments(); + public List> getArguments(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayConstructorExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayConstructorExpression.java index 41cda4fb..161dd131 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayConstructorExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayConstructorExpression.java @@ -13,17 +13,18 @@ import java.util.List; public interface ArrayConstructorExpression, - P extends ExpressionHolder> - extends Argument>, - NonPrimitiveExpression> { + P extends ExpressionHolder> + extends Argument>, + NonPrimitiveExpression> +{ - public ArrayConstructorExpression addDimension( ExpressionSource dim ); + public ArrayConstructorExpression addDimension(ExpressionSource dim); - public ArrayConstructorExpression init( ArrayInit array ); + public ArrayConstructorExpression init(ArrayInit array); - public ArrayInit> getInit(); + public ArrayInit> getInit(); - public List,?>> getDimensions(); + public List,?>> getDimensions(); - public int getDimension(); + public int getDimension(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayIndexer.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayIndexer.java index 856e0c01..b17e5aa9 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayIndexer.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayIndexer.java @@ -10,15 +10,16 @@ import org.jboss.forge.roaster.model.ExpressionHolder; import org.jboss.forge.roaster.model.source.JavaSource; -public interface ArrayIndexer,P extends ExpressionHolder> - extends OrdinalArgument>, - NonPrimitiveExpression> { +public interface ArrayIndexer, P extends ExpressionHolder> + extends OrdinalArgument>, + NonPrimitiveExpression> +{ - public ExpressionSource,?> getIndex(); + public ExpressionSource,?> getIndex(); - public ArrayIndexer setIndex( ExpressionSource index ); + public ArrayIndexer setIndex(ExpressionSource index); - public ExpressionSource,?> getTarget(); + public ExpressionSource,?> getTarget(); - public ArrayIndexer setTarget( ExpressionSource target ); + public ArrayIndexer setTarget(ExpressionSource target); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayInit.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayInit.java index 2a708a31..3b33f518 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayInit.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayInit.java @@ -13,18 +13,19 @@ import java.util.List; -public interface ArrayInit,P extends ExpressionHolder> - extends ExpressionSource>, - NonPrimitiveExpression> { +public interface ArrayInit, P extends ExpressionHolder> + extends ExpressionSource>, + NonPrimitiveExpression> +{ - public ArrayInit addElement( ArrayInit subRow ); + public ArrayInit addElement(ArrayInit subRow); - public ArrayInit addElement( ExpressionSource subElement ); + public ArrayInit addElement(ExpressionSource subElement); - public List,?>> getElements(); + public List,?>> getElements(); - public int size(); + public int size(); - public int getDimension(); + public int getDimension(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/AssignExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/AssignExpression.java index 74165b61..d3d60a61 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/AssignExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/AssignExpression.java @@ -11,19 +11,20 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface AssignExpression, - P extends ExpressionHolder> - extends NonPrimitiveExpression>, - Argument> { + P extends ExpressionHolder> + extends NonPrimitiveExpression>, + Argument> +{ - public String getOperator(); + public String getOperator(); - public AssignExpression setOperator( Assignment op ); + public AssignExpression setOperator(Assignment op); - public Accessor,?> getLeft(); + public Accessor,?> getLeft(); - public AssignExpression setLeft( Accessor left ); + public AssignExpression setLeft(Accessor left); - public ExpressionSource,?> getRight(); + public ExpressionSource,?> getRight(); - public AssignExpression setRight( ExpressionSource right ); + public AssignExpression setRight(ExpressionSource right); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Assignment.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Assignment.java index d5f8de7f..aed79729 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Assignment.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Assignment.java @@ -7,40 +7,46 @@ package org.jboss.forge.roaster.model.expressions; -public enum Assignment { - - ASSIGN( "=" ), - DIVIDE_ASSIGN( "/=" ), - PLUS_ASSIGN( "+=" ), - MINUS_ASSIGN( "-=" ), - TIMES_ASSIGN( "*=" ), - REMAINDER_ASSIGN( "%=" ), - - LEFT_SHIFT_ASSIGN( "<<=" ), - RIGHT_SHIFT_ASSIGN( ">>=" ), - RIGHT_SHIFT_UNSIGNED_ASSIGN( ">>>=" ), - BITWISE_XOR_ASSIGN( "^=" ), - BITWISE_AND_ASSIGN( "&=" ), - BITWISE_OR_ASSIGN( "|=" ); - - private String op; - - Assignment( String o ) { - op = o; - } - - public String getOp() { - return op; - } - - - public static Assignment build( String x ) { - for ( Assignment en : Assignment.values() ) { - if ( en.getOp().equals( x ) ) { - return en; - } - } - throw new IllegalStateException( "Unrecognized operation " + x ); - } +public enum Assignment +{ + + ASSIGN("="), + DIVIDE_ASSIGN("/="), + PLUS_ASSIGN("+="), + MINUS_ASSIGN("-="), + TIMES_ASSIGN("*="), + REMAINDER_ASSIGN("%="), + + LEFT_SHIFT_ASSIGN("<<="), + RIGHT_SHIFT_ASSIGN(">>="), + RIGHT_SHIFT_UNSIGNED_ASSIGN(">>>="), + BITWISE_XOR_ASSIGN("^="), + BITWISE_AND_ASSIGN("&="), + BITWISE_OR_ASSIGN("|="); + + private String op; + + Assignment(String o) + { + op = o; + } + + public String getOp() + { + return op; + } + + + public static Assignment build(String x) + { + for (Assignment en : Assignment.values()) + { + if (en.getOp().equals(x)) + { + return en; + } + } + throw new IllegalStateException("Unrecognized operation " + x); + } } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/BasicExpressionFactory.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/BasicExpressionFactory.java index 53257254..e463cb0c 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/BasicExpressionFactory.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/BasicExpressionFactory.java @@ -12,45 +12,46 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface BasicExpressionFactory, - P extends ExpressionHolder> - extends LiteralBuilder, - ConstructorBuilder { + P extends ExpressionHolder> + extends LiteralBuilder, + ConstructorBuilder +{ - public Variable var( String varName ); + public Variable var(String varName); - public OperatorExpression operator( Op op ); + public OperatorExpression operator(Op op); - public UnaryExpression operator( PrefixOp operator, Argument arg ); + public UnaryExpression operator(PrefixOp operator, Argument arg); - public TernaryExpression ternary(); + public TernaryExpression ternary(); - public CastExpression cast( String klass, ExpressionSource arg ); + public CastExpression cast(String klass, ExpressionSource arg); - public CastExpression cast( Class klass, ExpressionSource arg ); + public CastExpression cast(Class klass, ExpressionSource arg); - public ParenExpression paren( ExpressionSource inner ); + public ParenExpression paren(ExpressionSource inner); - public UnaryExpression not( Argument arg ); + public UnaryExpression not(Argument arg); - public AssignExpression assign( Assignment operator ); + public AssignExpression assign(Assignment operator); - public DeclareExpression declare( String klass, String name ); + public DeclareExpression declare(String klass, String name); - public DeclareExpression declare( Class klass, String name ); + public DeclareExpression declare(Class klass, String name); - public DeclareExpression declare( String klass, String name, ExpressionSource init ); + public DeclareExpression declare(String klass, String name, ExpressionSource init); - public DeclareExpression declare( Class klass, String name, ExpressionSource init ); + public DeclareExpression declare(Class klass, String name, ExpressionSource init); - public Accessor classStatic( String klass ); + public Accessor classStatic(String klass); - public Accessor classStatic( Class klass ); + public Accessor classStatic(Class klass); - public InstanceofExpression instanceOf( String klass, ExpressionSource arg ); + public InstanceofExpression instanceOf(String klass, ExpressionSource arg); - public InstanceofExpression instanceOf( Class klass, ExpressionSource arg ); + public InstanceofExpression instanceOf(Class klass, ExpressionSource arg); - public Super sup(); + public Super sup(); - public ArrayInit> vec(); + public ArrayInit> vec(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/BooleanLiteral.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/BooleanLiteral.java index 85637323..2179fbe1 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/BooleanLiteral.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/BooleanLiteral.java @@ -12,8 +12,9 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface BooleanLiteral, - P extends ExpressionHolder> - extends PrimitiveLiteral { + P extends ExpressionHolder> + extends PrimitiveLiteral +{ - public Boolean getValue(); + public Boolean getValue(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/CastExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/CastExpression.java index 1e496996..8c1e460d 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/CastExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/CastExpression.java @@ -11,11 +11,12 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface CastExpression, - P extends ExpressionHolder> - extends Argument>, - NonPrimitiveExpression> { + P extends ExpressionHolder> + extends Argument>, + NonPrimitiveExpression> +{ - public String getType(); + public String getType(); - public ExpressionSource,?> getExpression(); + public ExpressionSource,?> getExpression(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ChainableExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ChainableExpression.java index f4c33c2c..68aefaf2 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ChainableExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ChainableExpression.java @@ -12,10 +12,11 @@ public interface ChainableExpression, - P extends ExpressionHolder, - E extends NonPrimitiveExpression> - extends NonPrimitiveExpression { + P extends ExpressionHolder, + E extends NonPrimitiveExpression> + extends NonPrimitiveExpression +{ - public Accessor dot(); + public Accessor dot(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/CharacterLiteral.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/CharacterLiteral.java index 34821b7f..0fcce3c6 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/CharacterLiteral.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/CharacterLiteral.java @@ -12,8 +12,9 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface CharacterLiteral, - P extends ExpressionHolder> - extends PrimitiveLiteral { + P extends ExpressionHolder> + extends PrimitiveLiteral +{ - public Character getValue(); + public Character getValue(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ClassLiteral.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ClassLiteral.java index d78bab86..77b80b7b 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ClassLiteral.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ClassLiteral.java @@ -12,8 +12,9 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ClassLiteral, - P extends ExpressionHolder> - extends Literal>, - NonPrimitiveExpression>, - Accessor> { + P extends ExpressionHolder> + extends Literal>, + NonPrimitiveExpression>, + Accessor> +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ConstructorBuilder.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ConstructorBuilder.java index 59b56095..4594e1ca 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ConstructorBuilder.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ConstructorBuilder.java @@ -11,14 +11,15 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ConstructorBuilder, - P extends ExpressionHolder> { + P extends ExpressionHolder> +{ - public ConstructorExpression construct( String klass ); + public ConstructorExpression construct(String klass); - public ConstructorExpression construct( Class klass ); + public ConstructorExpression construct(Class klass); - public ArrayConstructorExpression newArray( Class klass ); + public ArrayConstructorExpression newArray(Class klass); - public ArrayConstructorExpression newArray( String klass ); + public ArrayConstructorExpression newArray(String klass); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ConstructorExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ConstructorExpression.java index f7d12057..2b4be8a9 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ConstructorExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ConstructorExpression.java @@ -11,10 +11,11 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ConstructorExpression, - P extends ExpressionHolder> - extends Argument>, - Accessor>, - ArgumentHolder>, - NonPrimitiveExpression> { + P extends ExpressionHolder> + extends Argument>, + Accessor>, + ArgumentHolder>, + NonPrimitiveExpression> +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/DeclareExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/DeclareExpression.java index 81464469..b33f6f6e 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/DeclareExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/DeclareExpression.java @@ -14,26 +14,27 @@ import java.util.Map; public interface DeclareExpression, - P extends ExpressionHolder> - extends Argument>, - NonPrimitiveExpression> { + P extends ExpressionHolder> + extends Argument>, + NonPrimitiveExpression> +{ - public DeclareExpression addDeclaration( String name, ExpressionSource expr ); + public DeclareExpression addDeclaration(String name, ExpressionSource expr); - public DeclareExpression addDeclaration( String name ); + public DeclareExpression addDeclaration(String name); - public String getVariableName(); + public String getVariableName(); - public List getVariableNames(); + public List getVariableNames(); - public String getVariableType(); + public String getVariableType(); - public ExpressionSource,?> getInitExpression(); + public ExpressionSource,?> getInitExpression(); - public Map,?>> getInitExpressions(); + public Map,?>> getInitExpressions(); - public boolean isSingleDeclaration(); + public boolean isSingleDeclaration(); - public int getNumVariables(); + public int getNumVariables(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Expression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Expression.java index be32c92a..a6f4efac 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Expression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Expression.java @@ -12,8 +12,9 @@ import org.jboss.forge.roaster.model.JavaType; public interface Expression, - P extends ExpressionHolder> - extends Origin

{ + P extends ExpressionHolder> + extends Origin

+{ - public void setOrigin( P origin ); + public void setOrigin(P origin); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ExpressionChainLink.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ExpressionChainLink.java index d8da1e0b..2be446f8 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ExpressionChainLink.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ExpressionChainLink.java @@ -11,12 +11,13 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ExpressionChainLink, - P extends ExpressionHolder> { + P extends ExpressionHolder> +{ - ExpressionSource chainExpression( ExpressionSource child ); + ExpressionSource chainExpression(ExpressionSource child); - ExpressionHolder getParent(); + ExpressionHolder getParent(); - void linkParent( ExpressionHolder parent ); + void linkParent(ExpressionHolder parent); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ExpressionSource.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ExpressionSource.java index d0a1c1de..5190b6d4 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ExpressionSource.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ExpressionSource.java @@ -11,8 +11,9 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ExpressionSource, - P extends ExpressionHolder, - E extends ExpressionSource> - extends Expression { + P extends ExpressionHolder, + E extends ExpressionSource> + extends Expression +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Expressions.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Expressions.java index adc662cf..d0ce5e72 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Expressions.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Expressions.java @@ -12,216 +12,260 @@ import java.util.ServiceLoader; -public abstract class Expressions { - - protected static ExpressionFactory factory; - - @SuppressWarnings( "unchecked" ) - protected static > ExpressionFactory getFactory() { - synchronized ( Expressions.class ) { - ServiceLoader sl = ServiceLoader.load( ExpressionFactory.class, Expressions.class.getClassLoader() ); - if ( sl.iterator().hasNext() ) { - factory = sl.iterator().next(); - } else { - throw new IllegalStateException( "No ExpressionFactory implementation available, unable to continue" ); - } - } - return factory; - } - - @SuppressWarnings( "unchecked" ) - public static > StringLiteral literal( String val ) { - return (StringLiteral) getFactory().literal( val ); - } - - @SuppressWarnings( "unchecked" ) - public static > NumberLiteral literal( Number val ) { - return (NumberLiteral) getFactory().literal( val ); - } - - @SuppressWarnings( "unchecked" ) - public static > CharacterLiteral literal( Character val ) { - return (CharacterLiteral) getFactory().literal( val ); - } - - @SuppressWarnings( "unchecked" ) - public static > BooleanLiteral literal( Boolean val ) { - return (BooleanLiteral) getFactory().literal( val ); - } - - @SuppressWarnings( "unchecked" ) - public static > Literal zeroLiteral( String klass ) { - return (Literal) getFactory().zeroLiteral( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > Literal zeroLiteral( Class klass ) { - return (Literal) getFactory().zeroLiteral( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > ThisLiteral thisLiteral() { - return (ThisLiteral) getFactory().thisLiteral(); - } - - @SuppressWarnings( "unchecked" ) - public static > NullLiteral nullLiteral() { - return (NullLiteral) getFactory().nullLiteral(); - } - - @SuppressWarnings( "unchecked" ) - public static > ClassLiteral classLiteral( String klass ) { - return (ClassLiteral) getFactory().classLiteral( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > ClassLiteral classLiteral( Class klass ) { - return (ClassLiteral) getFactory().classLiteral( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > Accessor classStatic( String klass ) { - return (Accessor) getFactory().classStatic( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > Accessor classStatic( Class klass ) { - return (Accessor) getFactory().classStatic( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > ConstructorExpression construct( String klass ) { - return (ConstructorExpression) getFactory().construct( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > ConstructorExpression construct( Class klass ) { - return (ConstructorExpression) getFactory().construct( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > ArrayConstructorExpression newArray( String klass ) { - return (ArrayConstructorExpression) getFactory().newArray( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > ArrayConstructorExpression newArray( Class klass ) { - return (ArrayConstructorExpression) getFactory().newArray( klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > ArrayInit vec() { - return (ArrayInit) getFactory().vec(); - } - - @SuppressWarnings( "unchecked" ) - public static > Variable var( String variable ) { - return (Variable) getFactory().var( variable ); - } - - @SuppressWarnings( "unchecked" ) - public static > OperatorExpression operator( Op operator ) { - return (OperatorExpression) getFactory().operator( operator ); - } - - @SuppressWarnings( "unchecked" ) - public static > UnaryExpression operator( PrefixOp operator, Argument arg ) { - return (UnaryExpression) getFactory().operator( operator, arg ); - } - - @SuppressWarnings( "unchecked" ) - public static > TernaryExpression ternary() { - return (TernaryExpression) getFactory().ternary(); - } - - @SuppressWarnings( "unchecked" ) - public static > Argument cast( String klass, ExpressionSource expression ) { - return (Argument) getFactory().cast( klass, expression ); - } - - @SuppressWarnings( "unchecked" ) - public static > Argument cast( Class klass, ExpressionSource expression ) { - return (Argument) getFactory().cast( klass, expression ); - } - - @SuppressWarnings( "unchecked" ) - public static > ParenExpression paren( ExpressionSource inner ) { - return (ParenExpression) getFactory().paren( inner ); - } - - @SuppressWarnings( "unchecked" ) - public static > UnaryExpression not( Argument inner ) { - return (UnaryExpression) getFactory().not( inner ); - } - - @SuppressWarnings( "unchecked" ) - public static > AssignExpression assign( Assignment operator ) { - return (AssignExpression) getFactory().assign( operator ); - } - - @SuppressWarnings( "unchecked" ) - public static > DeclareExpression declare( String klass, String name ) { - return (DeclareExpression) getFactory().declare( klass, name ); - } - - @SuppressWarnings( "unchecked" ) - public static > DeclareExpression declare( Class klass, String name ) { - return (DeclareExpression) getFactory().declare( klass, name ); - } - - @SuppressWarnings( "unchecked" ) - public static > DeclareExpression declare( String klass, String name, ExpressionSource init ) { - return (DeclareExpression) getFactory().declare( klass, name, init ); - } - - @SuppressWarnings( "unchecked" ) - public static > DeclareExpression declare( Class klass, String name, ExpressionSource init ) { - return (DeclareExpression) getFactory().declare( klass, name, init ); - } - - @SuppressWarnings( "unchecked" ) - public static > MethodCallExpression invoke( String method ) { - return (MethodCallExpression) getFactory().invoke( method ); - } - - @SuppressWarnings( "unchecked" ) - public static > Field field( String field ) { - return (Field) getFactory().field( field ); - } - - @SuppressWarnings( "unchecked" ) - public static > Getter getter( String field, String klass ) { - return (Getter) getFactory().getter( field, klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > Getter getter( String field, Class klass ) { - return (Getter) getFactory().getter( field, klass ); - } - - @SuppressWarnings( "unchecked" ) - public static > Setter setter( String field, String klass, ExpressionSource value ) { - return (Setter) getFactory().setter( field, klass, value ); - } - - @SuppressWarnings( "unchecked" ) - public static > Setter setter( String field, Class klass, ExpressionSource value ) { - return (Setter) getFactory().setter( field, klass, value ); - } - - @SuppressWarnings( "unchecked" ) - public static > Super sup() { - return (Super) getFactory().sup(); - } - - @SuppressWarnings( "unchecked" ) - public static > InstanceofExpression instanceOf( String klass, ExpressionSource expression ) { - return (InstanceofExpression) getFactory().instanceOf( klass, expression ); - } - - @SuppressWarnings( "unchecked" ) - public static > InstanceofExpression instanceOf( Class klass, ExpressionSource expression ) { - return (InstanceofExpression) getFactory().instanceOf( klass, expression ); - } +public abstract class Expressions +{ + + protected static ExpressionFactory factory; + + @SuppressWarnings("unchecked") + protected static > ExpressionFactory getFactory() + { + synchronized (Expressions.class) + { + ServiceLoader sl = ServiceLoader.load(ExpressionFactory.class, Expressions.class.getClassLoader()); + if (sl.iterator().hasNext()) + { + factory = sl.iterator().next(); + } else + { + throw new IllegalStateException("No ExpressionFactory implementation available, unable to continue"); + } + } + return factory; + } + + @SuppressWarnings("unchecked") + public static > StringLiteral literal(String val) + { + return (StringLiteral) getFactory().literal(val); + } + + @SuppressWarnings("unchecked") + public static > NumberLiteral literal(Number val) + { + return (NumberLiteral) getFactory().literal(val); + } + + @SuppressWarnings("unchecked") + public static > CharacterLiteral literal(Character val) + { + return (CharacterLiteral) getFactory().literal(val); + } + + @SuppressWarnings("unchecked") + public static > BooleanLiteral literal(Boolean val) + { + return (BooleanLiteral) getFactory().literal(val); + } + + @SuppressWarnings("unchecked") + public static > Literal zeroLiteral(String klass) + { + return (Literal) getFactory().zeroLiteral(klass); + } + + @SuppressWarnings("unchecked") + public static > Literal zeroLiteral(Class klass) + { + return (Literal) getFactory().zeroLiteral(klass); + } + + @SuppressWarnings("unchecked") + public static > ThisLiteral thisLiteral() + { + return (ThisLiteral) getFactory().thisLiteral(); + } + + @SuppressWarnings("unchecked") + public static > NullLiteral nullLiteral() + { + return (NullLiteral) getFactory().nullLiteral(); + } + + @SuppressWarnings("unchecked") + public static > ClassLiteral classLiteral(String klass) + { + return (ClassLiteral) getFactory().classLiteral(klass); + } + + @SuppressWarnings("unchecked") + public static > ClassLiteral classLiteral(Class klass) + { + return (ClassLiteral) getFactory().classLiteral(klass); + } + + @SuppressWarnings("unchecked") + public static > Accessor classStatic(String klass) + { + return (Accessor) getFactory().classStatic(klass); + } + + @SuppressWarnings("unchecked") + public static > Accessor classStatic(Class klass) + { + return (Accessor) getFactory().classStatic(klass); + } + + @SuppressWarnings("unchecked") + public static > ConstructorExpression construct(String klass) + { + return (ConstructorExpression) getFactory().construct(klass); + } + + @SuppressWarnings("unchecked") + public static > ConstructorExpression construct(Class klass) + { + return (ConstructorExpression) getFactory().construct(klass); + } + + @SuppressWarnings("unchecked") + public static > ArrayConstructorExpression newArray(String klass) + { + return (ArrayConstructorExpression) getFactory().newArray(klass); + } + + @SuppressWarnings("unchecked") + public static > ArrayConstructorExpression newArray(Class klass) + { + return (ArrayConstructorExpression) getFactory().newArray(klass); + } + + @SuppressWarnings("unchecked") + public static > ArrayInit vec() + { + return (ArrayInit) getFactory().vec(); + } + + @SuppressWarnings("unchecked") + public static > Variable var(String variable) + { + return (Variable) getFactory().var(variable); + } + + @SuppressWarnings("unchecked") + public static > OperatorExpression operator(Op operator) + { + return (OperatorExpression) getFactory().operator(operator); + } + + @SuppressWarnings("unchecked") + public static > UnaryExpression operator(PrefixOp operator, Argument arg) + { + return (UnaryExpression) getFactory().operator(operator, arg); + } + + @SuppressWarnings("unchecked") + public static > TernaryExpression ternary() + { + return (TernaryExpression) getFactory().ternary(); + } + + @SuppressWarnings("unchecked") + public static > Argument cast(String klass, ExpressionSource expression) + { + return (Argument) getFactory().cast(klass, expression); + } + + @SuppressWarnings("unchecked") + public static > Argument cast(Class klass, ExpressionSource expression) + { + return (Argument) getFactory().cast(klass, expression); + } + + @SuppressWarnings("unchecked") + public static > ParenExpression paren(ExpressionSource inner) + { + return (ParenExpression) getFactory().paren(inner); + } + + @SuppressWarnings("unchecked") + public static > UnaryExpression not(Argument inner) + { + return (UnaryExpression) getFactory().not(inner); + } + + @SuppressWarnings("unchecked") + public static > AssignExpression assign(Assignment operator) + { + return (AssignExpression) getFactory().assign(operator); + } + + @SuppressWarnings("unchecked") + public static > DeclareExpression declare(String klass, String name) + { + return (DeclareExpression) getFactory().declare(klass, name); + } + + @SuppressWarnings("unchecked") + public static > DeclareExpression declare(Class klass, String name) + { + return (DeclareExpression) getFactory().declare(klass, name); + } + + @SuppressWarnings("unchecked") + public static > DeclareExpression declare(String klass, String name, ExpressionSource init) + { + return (DeclareExpression) getFactory().declare(klass, name, init); + } + + @SuppressWarnings("unchecked") + public static > DeclareExpression declare(Class klass, String name, ExpressionSource init) + { + return (DeclareExpression) getFactory().declare(klass, name, init); + } + + @SuppressWarnings("unchecked") + public static > MethodCallExpression invoke(String method) + { + return (MethodCallExpression) getFactory().invoke(method); + } + + @SuppressWarnings("unchecked") + public static > Field field(String field) + { + return (Field) getFactory().field(field); + } + + @SuppressWarnings("unchecked") + public static > Getter getter(String field, String klass) + { + return (Getter) getFactory().getter(field, klass); + } + + @SuppressWarnings("unchecked") + public static > Getter getter(String field, Class klass) + { + return (Getter) getFactory().getter(field, klass); + } + + @SuppressWarnings("unchecked") + public static > Setter setter(String field, String klass, ExpressionSource value) + { + return (Setter) getFactory().setter(field, klass, value); + } + + @SuppressWarnings("unchecked") + public static > Setter setter(String field, Class klass, ExpressionSource value) + { + return (Setter) getFactory().setter(field, klass, value); + } + + @SuppressWarnings("unchecked") + public static > Super sup() + { + return (Super) getFactory().sup(); + } + + @SuppressWarnings("unchecked") + public static > InstanceofExpression instanceOf(String klass, ExpressionSource expression) + { + return (InstanceofExpression) getFactory().instanceOf(klass, expression); + } + + @SuppressWarnings("unchecked") + public static > InstanceofExpression instanceOf(Class klass, ExpressionSource expression) + { + return (InstanceofExpression) getFactory().instanceOf(klass, expression); + } } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Field.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Field.java index dd16a495..4feb6041 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Field.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Field.java @@ -12,11 +12,12 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface Field, - P extends ExpressionHolder> - extends OrdinalArgument>, - NonPrimitiveExpression> { + P extends ExpressionHolder> + extends OrdinalArgument>, + NonPrimitiveExpression> +{ - public String getFieldName(); + public String getFieldName(); - public ExpressionSource,?> getSource(); + public ExpressionSource,?> getSource(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Getter.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Getter.java index 8cda6708..4f698886 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Getter.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Getter.java @@ -12,10 +12,11 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface Getter, - P extends ExpressionHolder> - extends Accessor>, - MethodInvokeExpression>, - ExpressionChainLink> { + P extends ExpressionHolder> + extends Accessor>, + MethodInvokeExpression>, + ExpressionChainLink> +{ - public String getFieldName(); + public String getFieldName(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/InstanceofExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/InstanceofExpression.java index 00dcc4fe..bb6e61e8 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/InstanceofExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/InstanceofExpression.java @@ -11,11 +11,12 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface InstanceofExpression, - P extends ExpressionHolder> - extends Argument>, - NonPrimitiveExpression> { + P extends ExpressionHolder> + extends Argument>, + NonPrimitiveExpression> +{ - public String getTypeName(); + public String getTypeName(); - public ExpressionSource,?> getExpression(); + public ExpressionSource,?> getExpression(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Literal.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Literal.java index 9c6ff565..58bab4a4 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Literal.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Literal.java @@ -11,7 +11,8 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface Literal, - P extends ExpressionHolder, - E extends Literal> - extends Argument { + P extends ExpressionHolder, + E extends Literal> + extends Argument +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/LiteralBuilder.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/LiteralBuilder.java index 0d4afc69..2378d9c5 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/LiteralBuilder.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/LiteralBuilder.java @@ -12,26 +12,27 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface LiteralBuilder, - P extends ExpressionHolder> { + P extends ExpressionHolder> +{ - public StringLiteral literal( String val ); + public StringLiteral literal(String val); - public PrimitiveLiteral literal( Number val ); + public PrimitiveLiteral literal(Number val); - public PrimitiveLiteral literal( Character val ); + public PrimitiveLiteral literal(Character val); - public PrimitiveLiteral literal( Boolean val ); + public PrimitiveLiteral literal(Boolean val); - public Literal zeroLiteral( String klass ); + public Literal zeroLiteral(String klass); - public Literal zeroLiteral( Class klass ); + public Literal zeroLiteral(Class klass); - public ThisLiteral thisLiteral(); + public ThisLiteral thisLiteral(); - public NullLiteral nullLiteral(); + public NullLiteral nullLiteral(); - public ClassLiteral classLiteral( String klass ); + public ClassLiteral classLiteral(String klass); - public ClassLiteral classLiteral( Class klass ); + public ClassLiteral classLiteral(Class klass); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodCallExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodCallExpression.java index cec2bc5b..bdb997ed 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodCallExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodCallExpression.java @@ -12,9 +12,10 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface MethodCallExpression, - P extends ExpressionHolder> - extends MethodWithArgumentsInvokeExpression> { + P extends ExpressionHolder> + extends MethodWithArgumentsInvokeExpression> +{ - public MethodCallExpression setMethodName( String name ); + public MethodCallExpression setMethodName(String name); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodInvokeExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodInvokeExpression.java index 460e6791..b12d2569 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodInvokeExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodInvokeExpression.java @@ -11,16 +11,17 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface MethodInvokeExpression, - P extends ExpressionHolder, - M extends MethodInvokeExpression> - extends Argument, - ChainableExpression, - NonPrimitiveExpression { + P extends ExpressionHolder, + M extends MethodInvokeExpression> + extends Argument, + ChainableExpression, + NonPrimitiveExpression +{ - public String getMethodName(); + public String getMethodName(); - public M setTarget( ExpressionSource target ); + public M setTarget(ExpressionSource target); - public ExpressionSource getTarget(); + public ExpressionSource getTarget(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodWithArgumentsInvokeExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodWithArgumentsInvokeExpression.java index 5f126cec..c7fff14d 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodWithArgumentsInvokeExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/MethodWithArgumentsInvokeExpression.java @@ -11,9 +11,10 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface MethodWithArgumentsInvokeExpression, - P extends ExpressionHolder, - M extends MethodWithArgumentsInvokeExpression> - extends MethodInvokeExpression, - ArgumentHolder { + P extends ExpressionHolder, + M extends MethodWithArgumentsInvokeExpression> + extends MethodInvokeExpression, + ArgumentHolder +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/NonPrimitiveExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/NonPrimitiveExpression.java index 676cfa79..a9c71799 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/NonPrimitiveExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/NonPrimitiveExpression.java @@ -8,12 +8,12 @@ package org.jboss.forge.roaster.model.expressions; import org.jboss.forge.roaster.model.ExpressionHolder; -import org.jboss.forge.roaster.model.JavaType; import org.jboss.forge.roaster.model.source.JavaSource; public interface NonPrimitiveExpression, - P extends ExpressionHolder, - E extends NonPrimitiveExpression> - extends ExpressionSource, - ExpressionHolder { + P extends ExpressionHolder, + E extends NonPrimitiveExpression> + extends ExpressionSource, + ExpressionHolder +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/NullLiteral.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/NullLiteral.java index 048d7066..c607fc53 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/NullLiteral.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/NullLiteral.java @@ -12,6 +12,7 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface NullLiteral, - P extends ExpressionHolder> - extends Literal> { + P extends ExpressionHolder> + extends Literal> +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/NumberLiteral.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/NumberLiteral.java index 2cdad7ff..78e099b7 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/NumberLiteral.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/NumberLiteral.java @@ -12,8 +12,9 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface NumberLiteral, - P extends ExpressionHolder> - extends PrimitiveLiteral { + P extends ExpressionHolder> + extends PrimitiveLiteral +{ - public Number getValue(); + public Number getValue(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Op.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Op.java index 1fa607b4..57167a51 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Op.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Op.java @@ -8,44 +8,50 @@ package org.jboss.forge.roaster.model.expressions; -public enum Op { - - TIMES( "*" ), - DIVIDE( "/" ), - REMAINDER( "%" ), - PLUS( "+" ), - MINUS( "-" ), - LEFT_SHIFT( "<<" ), - RIGHT_SHIFT_SIGNED( ">>" ), - RIGHT_SHIFT_UNSIGNED( ">>>" ), - LESS( "<" ), - GREATER( ">" ), - LESS_EQUALS( "<=" ), - GREATER_EQUALS( ">=" ), - EQUALS( "==" ), - NOT_EQUALS( "!=" ), - BITWISE_XOR( "^" ), - BITWISE_AND( "&" ), - BITWISE_OR( "|" ), - OR( "||" ), - AND( "&&" ); - - private String op; - - Op( String o ) { - op = o; - } - - public String getOp() { - return op; - } - - public static Op build( String x ) { - for ( Op en : Op.values() ) { - if ( en.getOp().equals( x ) ) { - return en; - } - } - throw new IllegalStateException( "Unrecognized operation " + x ); - } +public enum Op +{ + + TIMES("*"), + DIVIDE("/"), + REMAINDER("%"), + PLUS("+"), + MINUS("-"), + LEFT_SHIFT("<<"), + RIGHT_SHIFT_SIGNED(">>"), + RIGHT_SHIFT_UNSIGNED(">>>"), + LESS("<"), + GREATER(">"), + LESS_EQUALS("<="), + GREATER_EQUALS(">="), + EQUALS("=="), + NOT_EQUALS("!="), + BITWISE_XOR("^"), + BITWISE_AND("&"), + BITWISE_OR("|"), + OR("||"), + AND("&&"); + + private String op; + + Op(String o) + { + op = o; + } + + public String getOp() + { + return op; + } + + public static Op build(String x) + { + for (Op en : Op.values()) + { + if (en.getOp().equals(x)) + { + return en; + } + } + throw new IllegalStateException("Unrecognized operation " + x); + } } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/OperatorExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/OperatorExpression.java index c91e9303..9158729b 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/OperatorExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/OperatorExpression.java @@ -12,13 +12,14 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface OperatorExpression, - P extends ExpressionHolder> - extends Argument>, - NonPrimitiveExpression>, - ArgumentHolder> { + P extends ExpressionHolder> + extends Argument>, + NonPrimitiveExpression>, + ArgumentHolder> +{ - public OperatorExpression addArgument( Argument arg ); + public OperatorExpression addArgument(Argument arg); - public String getOperator(); + public String getOperator(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/OrdinalArgument.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/OrdinalArgument.java index 2d83ba3e..d44b0040 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/OrdinalArgument.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/OrdinalArgument.java @@ -11,15 +11,16 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface OrdinalArgument, - P extends ExpressionHolder, - E extends NonPrimitiveExpression> - extends Argument, - Accessor, - NonPrimitiveExpression, - ExpressionChainLink { + P extends ExpressionHolder, + E extends NonPrimitiveExpression> + extends Argument, + Accessor, + NonPrimitiveExpression, + ExpressionChainLink +{ - public PostFixExpression> inc(); + public PostFixExpression> inc(); - public PostFixExpression> dec(); + public PostFixExpression> dec(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ParenExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ParenExpression.java index 20e3324c..4511016f 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ParenExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ParenExpression.java @@ -12,10 +12,11 @@ import org.jboss.forge.roaster.spi.ExpressionFactory; public interface ParenExpression, - P extends ExpressionHolder> - extends ExpressionFactory>, - NonPrimitiveExpression>, - Argument> { + P extends ExpressionHolder> + extends ExpressionFactory>, + NonPrimitiveExpression>, + Argument> +{ - public ExpressionSource,?> getExpression(); + public ExpressionSource,?> getExpression(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/PostFixExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/PostFixExpression.java index a4acebff..255cd293 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/PostFixExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/PostFixExpression.java @@ -12,7 +12,8 @@ public interface PostFixExpression, - P extends ExpressionHolder> - extends UnaryExpression { + P extends ExpressionHolder> + extends UnaryExpression +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/PostfixOp.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/PostfixOp.java index 305367fb..fa0fbfc6 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/PostfixOp.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/PostfixOp.java @@ -8,27 +8,33 @@ package org.jboss.forge.roaster.model.expressions; -public enum PostfixOp { - - INC( "++" ), - DEC( "--" ); - - private String op; - - PostfixOp( String o ) { - op = o; - } - - public String getOp() { - return op; - } - - public static PostfixOp build( String x ) { - for ( PostfixOp en : PostfixOp.values() ) { - if ( en.getOp().equals( x ) ) { - return en; - } - } - throw new IllegalStateException( "Unrecognized operation " + x ); - } +public enum PostfixOp +{ + + INC("++"), + DEC("--"); + + private String op; + + PostfixOp(String o) + { + op = o; + } + + public String getOp() + { + return op; + } + + public static PostfixOp build(String x) + { + for (PostfixOp en : PostfixOp.values()) + { + if (en.getOp().equals(x)) + { + return en; + } + } + throw new IllegalStateException("Unrecognized operation " + x); + } } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/PrefixOp.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/PrefixOp.java index 78f8d68c..52b4c40f 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/PrefixOp.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/PrefixOp.java @@ -8,31 +8,37 @@ package org.jboss.forge.roaster.model.expressions; -public enum PrefixOp { - - INC( "++" ), - DEC( "--" ), - PLUS( "+" ), - MINUS( "-" ), - NOT( "!" ), - NEG( "~" ); - - private String op; - - PrefixOp( String o ) { - op = o; - } - - public String getOp() { - return op; - } - - public static PrefixOp build( String x ) { - for ( PrefixOp en : PrefixOp.values() ) { - if ( en.getOp().equals( x ) ) { - return en; - } - } - throw new IllegalStateException( "Unrecognized operation " + x ); - } +public enum PrefixOp +{ + + INC("++"), + DEC("--"), + PLUS("+"), + MINUS("-"), + NOT("!"), + NEG("~"); + + private String op; + + PrefixOp(String o) + { + op = o; + } + + public String getOp() + { + return op; + } + + public static PrefixOp build(String x) + { + for (PrefixOp en : PrefixOp.values()) + { + if (en.getOp().equals(x)) + { + return en; + } + } + throw new IllegalStateException("Unrecognized operation " + x); + } } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/PrimitiveLiteral.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/PrimitiveLiteral.java index b3160665..3c7fda9d 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/PrimitiveLiteral.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/PrimitiveLiteral.java @@ -12,6 +12,7 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface PrimitiveLiteral, - P extends ExpressionHolder> - extends Literal> { + P extends ExpressionHolder> + extends Literal> +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Setter.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Setter.java index 39f8a007..f741e550 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Setter.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Setter.java @@ -12,9 +12,10 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface Setter, - P extends ExpressionHolder> - extends ExpressionSource>, - MethodWithArgumentsInvokeExpression> { + P extends ExpressionHolder> + extends ExpressionSource>, + MethodWithArgumentsInvokeExpression> +{ - public ExpressionSource,?> getValue(); + public ExpressionSource,?> getValue(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/StringLiteral.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/StringLiteral.java index abb1cd6b..ee8d324c 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/StringLiteral.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/StringLiteral.java @@ -12,11 +12,12 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface StringLiteral, - P extends ExpressionHolder> - extends Literal>, - NonPrimitiveExpression>, - Accessor> { + P extends ExpressionHolder> + extends Literal>, + NonPrimitiveExpression>, + Accessor> +{ - public String getValue(); + public String getValue(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Super.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Super.java index 4292f420..10bd21cd 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Super.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Super.java @@ -12,8 +12,9 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface Super, - P extends ExpressionHolder> - extends AccessBuilder>, - NonPrimitiveExpression> { + P extends ExpressionHolder> + extends AccessBuilder>, + NonPrimitiveExpression> +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/TernaryExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/TernaryExpression.java index 7399576d..9416293f 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/TernaryExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/TernaryExpression.java @@ -11,24 +11,24 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface TernaryExpression, - P extends ExpressionHolder> - extends Argument>, - NonPrimitiveExpression> { + P extends ExpressionHolder> + extends Argument>, + NonPrimitiveExpression> +{ - public ExpressionSource,?> getCondition(); + public ExpressionSource,?> getCondition(); - public TernaryExpression setCondition( ExpressionSource expression ); + public TernaryExpression setCondition(ExpressionSource expression); - public ExpressionSource,?> getThenExpression(); + public ExpressionSource,?> getThenExpression(); - public TernaryExpression setThenExpression( ExpressionSource onTrue ); + public TernaryExpression setThenExpression(ExpressionSource onTrue); - public ExpressionSource,?> getElseExpression(); - - public TernaryExpression setElseExpression( ExpressionSource onFalse ); + public ExpressionSource,?> getElseExpression(); + public TernaryExpression setElseExpression(ExpressionSource onFalse); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ThisLiteral.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ThisLiteral.java index 9eb6cb8a..fccef5e3 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/ThisLiteral.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/ThisLiteral.java @@ -12,9 +12,10 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ThisLiteral, - P extends ExpressionHolder> - extends Literal>, - NonPrimitiveExpression>, - Accessor>, - ExpressionChainLink { + P extends ExpressionHolder> + extends Literal>, + NonPrimitiveExpression>, + Accessor>, + ExpressionChainLink +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/UnaryExpression.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/UnaryExpression.java index ff68ff46..e1b7e701 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/UnaryExpression.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/UnaryExpression.java @@ -11,11 +11,12 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface UnaryExpression, - P extends ExpressionHolder> - extends Argument>, - NonPrimitiveExpression> { + P extends ExpressionHolder> + extends Argument>, + NonPrimitiveExpression> +{ - public ExpressionSource,?> getExpression(); + public ExpressionSource,?> getExpression(); - public String getOperator(); + public String getOperator(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Variable.java b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Variable.java index 00f8b61d..3db7ce38 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/expressions/Variable.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/expressions/Variable.java @@ -11,8 +11,9 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface Variable, - P extends ExpressionHolder> - extends OrdinalArgument> { + P extends ExpressionHolder> + extends OrdinalArgument> +{ - String getName(); + String getName(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/AssertStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/AssertStatement.java index a731b434..89050bcd 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/AssertStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/AssertStatement.java @@ -12,16 +12,17 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface AssertStatement, - P extends BlockHolder> - extends StatementSource> { + P extends BlockHolder> + extends StatementSource> +{ - public ExpressionSource,?> getAssertion(); + public ExpressionSource,?> getAssertion(); - public AssertStatement setAssertion( ExpressionSource expression ); + public AssertStatement setAssertion(ExpressionSource expression); - public ExpressionSource,?> getMessage(); + public ExpressionSource,?> getMessage(); - public AssertStatement setMessage( ExpressionSource msg ); + public AssertStatement setMessage(ExpressionSource msg); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/AssignmentStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/AssignmentStatement.java index e832f2f2..826524eb 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/AssignmentStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/AssignmentStatement.java @@ -16,19 +16,20 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface AssignmentStatement, - P extends BlockHolder> - extends ExpressionStatement> { + P extends BlockHolder> + extends ExpressionStatement> +{ - public Accessor>, ?> getLeft(); + public Accessor>,?> getLeft(); - public AssignmentStatement setLeft( Accessor left ); + public AssignmentStatement setLeft(Accessor left); - public String getAssignmentOperator(); + public String getAssignmentOperator(); - public AssignmentStatement setAssignmentOperator( Assignment op ); + public AssignmentStatement setAssignmentOperator(Assignment op); - public ExpressionSource>, ?> getRight(); + public ExpressionSource>,?> getRight(); - public AssignmentStatement setRight( ExpressionSource right ); + public AssignmentStatement setRight(ExpressionSource right); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/BlockStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/BlockStatement.java index f6732d65..3974b544 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/BlockStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/BlockStatement.java @@ -12,7 +12,8 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface BlockStatement, - P extends BlockHolder> - extends BlockSource>, - StatementSource> { + P extends BlockHolder> + extends BlockSource>, + StatementSource> +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/BodyHolder.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/BodyHolder.java index 3d45286b..d9e1167e 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/BodyHolder.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/BodyHolder.java @@ -1,4 +1,3 @@ - package org.jboss.forge.roaster.model.statements; import org.jboss.forge.roaster.model.source.BlockHolder; @@ -6,14 +5,15 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface BodyHolder, - P extends BlockHolder, - B extends BodyHolder> - extends BlockHolder { + P extends BlockHolder, + B extends BodyHolder> + extends BlockHolder +{ - public BlockStatement getBody(); + public BlockStatement getBody(); - public B setBody( BlockSource body ); + public B setBody(BlockSource body); - public B setBody( StatementSource body ); + public B setBody(StatementSource body); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/BranchingStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/BranchingStatement.java index 16f2a24d..552f3be9 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/BranchingStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/BranchingStatement.java @@ -11,7 +11,8 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface BranchingStatement, - P extends BlockHolder, - S extends BranchingStatement> - extends ControlFlowStatement { + P extends BlockHolder, + S extends BranchingStatement> + extends ControlFlowStatement +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/BreakStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/BreakStatement.java index 3aa4e910..a1a471e8 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/BreakStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/BreakStatement.java @@ -12,11 +12,12 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface BreakStatement, - P extends BlockHolder> - extends BranchingStatement> { + P extends BlockHolder> + extends BranchingStatement> +{ - public String getBreakToLabel(); + public String getBreakToLabel(); - public BreakStatement setBreakToLabel( String label ); + public BreakStatement setBreakToLabel(String label); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/ContinueStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/ContinueStatement.java index 17b2ee23..c182edb6 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/ContinueStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/ContinueStatement.java @@ -12,11 +12,12 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ContinueStatement, - P extends BlockHolder> - extends BranchingStatement> { + P extends BlockHolder> + extends BranchingStatement> +{ - public String getContinueToLabel(); + public String getContinueToLabel(); - public ContinueStatement setContinueToLabel( String label ); + public ContinueStatement setContinueToLabel(String label); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/ControlFlowStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/ControlFlowStatement.java index fca667aa..36193518 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/ControlFlowStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/ControlFlowStatement.java @@ -12,8 +12,9 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ControlFlowStatement, - P extends BlockHolder, - S extends ControlFlowStatement> - extends StatementSource, - ExpressionHolder { + P extends BlockHolder, + S extends ControlFlowStatement> + extends StatementSource, + ExpressionHolder +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/DeclareStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/DeclareStatement.java index 08dd7833..b04d2db2 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/DeclareStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/DeclareStatement.java @@ -16,34 +16,35 @@ import java.util.Map; public interface DeclareStatement, - P extends BlockHolder> - extends StatementSource> { + P extends BlockHolder> + extends StatementSource> +{ - public List getVariableNames(); + public List getVariableNames(); - public String getVariableName(); + public String getVariableName(); - public String getVariableType(); + public String getVariableType(); - public Map,?>> getInitExpressions(); + public Map,?>> getInitExpressions(); - public ExpressionSource,?> getInitExpression(); + public ExpressionSource,?> getInitExpression(); - public boolean isSingleDeclaration(); + public boolean isSingleDeclaration(); - public DeclareStatement setVariable( Class klass, String name ); + public DeclareStatement setVariable(Class klass, String name); - public DeclareStatement setVariable( String klass, String name ); + public DeclareStatement setVariable(String klass, String name); - public DeclareStatement setVariable( Class klass, String name, ExpressionSource init ); + public DeclareStatement setVariable(Class klass, String name, ExpressionSource init); - public DeclareStatement setVariable( String klass, String name, ExpressionSource init ); + public DeclareStatement setVariable(String klass, String name, ExpressionSource init); - public DeclareStatement addVariable( String name ); + public DeclareStatement addVariable(String name); - public DeclareStatement addVariable( String name, ExpressionSource init ); + public DeclareStatement addVariable(String name, ExpressionSource init); } \ No newline at end of file diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/DoWhileStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/DoWhileStatement.java index 477805a2..13dda15e 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/DoWhileStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/DoWhileStatement.java @@ -12,12 +12,13 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface DoWhileStatement, - P extends BlockHolder> - extends LoopingStatement>, - BodyHolder> { + P extends BlockHolder> + extends LoopingStatement>, + BodyHolder> +{ - public ExpressionSource,?> getCondition(); + public ExpressionSource,?> getCondition(); - public DoWhileStatement setCondition( ExpressionSource expr ); + public DoWhileStatement setCondition(ExpressionSource expr); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/EvalExpressionStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/EvalExpressionStatement.java index 926423ea..8fa8b240 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/EvalExpressionStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/EvalExpressionStatement.java @@ -12,12 +12,13 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface EvalExpressionStatement, - P extends BlockHolder> - extends ExpressionStatement> { + P extends BlockHolder> + extends ExpressionStatement> +{ - public ExpressionSource,?> getExpr(); + public ExpressionSource,?> getExpr(); - public EvalExpressionStatement setExpr( ExpressionSource expr ); + public EvalExpressionStatement setExpr(ExpressionSource expr); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/ExpressionStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/ExpressionStatement.java index 29916465..fdedbda1 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/ExpressionStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/ExpressionStatement.java @@ -13,10 +13,11 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ExpressionStatement, - P extends BlockHolder, - S extends ExpressionStatement> - extends StatementSource, - ExpressionHolder { + P extends BlockHolder, + S extends ExpressionStatement> + extends StatementSource, + ExpressionHolder +{ - public ExpressionSource getExpression(); + public ExpressionSource getExpression(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/ForEachStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/ForEachStatement.java index 5afbfc83..0c6fd60d 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/ForEachStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/ForEachStatement.java @@ -12,21 +12,22 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ForEachStatement, - P extends BlockHolder> - extends LoopingStatement>, - BodyHolder> { + P extends BlockHolder> + extends LoopingStatement>, + BodyHolder> +{ - public String getIteratorName(); + public String getIteratorName(); - public String getIteratorType(); + public String getIteratorType(); - public ForEachStatement setIterator( String klass, String name ); + public ForEachStatement setIterator(String klass, String name); - public ForEachStatement setIterator( Class klass, String name ); + public ForEachStatement setIterator(Class klass, String name); - public ExpressionSource,?> getSource(); + public ExpressionSource,?> getSource(); - public ForEachStatement setSource( ExpressionSource expr ); + public ForEachStatement setSource(ExpressionSource expr); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/ForStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/ForStatement.java index 4c1e95a4..efde3044 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/ForStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/ForStatement.java @@ -15,22 +15,23 @@ import java.util.List; public interface ForStatement, - P extends BlockHolder> - extends LoopingStatement>, - BodyHolder> { + P extends BlockHolder> + extends LoopingStatement>, + BodyHolder> +{ - public DeclareExpression> getDeclaration(); + public DeclareExpression> getDeclaration(); - public ForStatement setDeclaration( DeclareExpression declaration ); + public ForStatement setDeclaration(DeclareExpression declaration); - public ExpressionSource,?> getCondition(); + public ExpressionSource,?> getCondition(); - public ForStatement setCondition( ExpressionSource booleanExpression ); + public ForStatement setCondition(ExpressionSource booleanExpression); - public List,?>> getUpdates(); + public List,?>> getUpdates(); - public ForStatement addUpdate( ExpressionSource expression ); + public ForStatement addUpdate(ExpressionSource expression); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/IfStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/IfStatement.java index b29496f9..6e0f3283 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/IfStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/IfStatement.java @@ -13,26 +13,27 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface IfStatement, - P extends BlockHolder> - extends ControlFlowStatement>, - BodyHolder> { + P extends BlockHolder> + extends ControlFlowStatement>, + BodyHolder> +{ - public ExpressionSource,?> getCondition(); + public ExpressionSource,?> getCondition(); - public IfStatement setCondition( ExpressionSource condition ); + public IfStatement setCondition(ExpressionSource condition); - public BlockStatement> getThen(); + public BlockStatement> getThen(); - public IfStatement setThen( StatementSource ifBlock ); + public IfStatement setThen(StatementSource ifBlock); - public IfStatement setThen( BlockSource ifBlock ); + public IfStatement setThen(BlockSource ifBlock); - public BlockStatement> getElse(); + public BlockStatement> getElse(); - public IfStatement setElse( StatementSource elseBlock ); + public IfStatement setElse(StatementSource elseBlock); - public IfStatement setElse( BlockSource elseBlock ); + public IfStatement setElse(BlockSource elseBlock); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/InvokeStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/InvokeStatement.java index 7f549953..c5c06c97 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/InvokeStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/InvokeStatement.java @@ -17,21 +17,22 @@ import java.util.List; public interface InvokeStatement, - P extends BlockHolder> - extends ExpressionStatement> { + P extends BlockHolder> + extends ExpressionStatement> +{ - public String getMethod(); + public String getMethod(); - public InvokeStatement setMethod( String method ); + public InvokeStatement setMethod(String method); - public Accessor,?>,?> getTarget(); + public Accessor,?>,?> getTarget(); - public InvokeStatement setTarget( Accessor target ); + public InvokeStatement setTarget(Accessor target); - public List,?>,?>> getArguments(); + public List,?>,?>> getArguments(); - public InvokeStatement addArgument( Argument argument ); + public InvokeStatement addArgument(Argument argument); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/LoopingStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/LoopingStatement.java index 6032660d..2a9647f6 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/LoopingStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/LoopingStatement.java @@ -11,7 +11,8 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface LoopingStatement, - P extends BlockHolder, - S extends LoopingStatement> - extends ControlFlowStatement { + P extends BlockHolder, + S extends LoopingStatement> + extends ControlFlowStatement +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/ReturnStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/ReturnStatement.java index a2b714c6..03140c94 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/ReturnStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/ReturnStatement.java @@ -14,12 +14,13 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ReturnStatement, - P extends BlockHolder> - extends BranchingStatement>, - ExpressionHolder { + P extends BlockHolder> + extends BranchingStatement>, + ExpressionHolder +{ - public ExpressionSource,?> getReturn(); + public ExpressionSource,?> getReturn(); - public ReturnStatement setReturn( ExpressionSource expr ); + public ReturnStatement setReturn(ExpressionSource expr); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/Statement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/Statement.java index 670e1642..78d7053e 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/Statement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/Statement.java @@ -14,16 +14,17 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface Statement, - P extends BlockHolder, - S extends Statement> - extends Origin

, - ExpressionHolder { + P extends BlockHolder, + S extends Statement> + extends Origin

, + ExpressionHolder +{ - public void setOrigin( P origin ); + public void setOrigin(P origin); - public S setLabel( String label ); + public S setLabel(String label); - public String getLabel(); + public String getLabel(); - public boolean hasLabel(); + public boolean hasLabel(); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/StatementSource.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/StatementSource.java index 89785cef..702abf3a 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/StatementSource.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/StatementSource.java @@ -8,15 +8,12 @@ package org.jboss.forge.roaster.model.statements; -import org.jboss.forge.roaster.Origin; -import org.jboss.forge.roaster.model.Block; -import org.jboss.forge.roaster.model.ExpressionHolder; import org.jboss.forge.roaster.model.source.BlockHolder; -import org.jboss.forge.roaster.model.source.BlockSource; import org.jboss.forge.roaster.model.source.JavaSource; public interface StatementSource, - P extends BlockHolder, - S extends StatementSource> - extends Statement { + P extends BlockHolder, + S extends StatementSource> + extends Statement +{ } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/Statements.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/Statements.java index 069774ea..d47b146c 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/Statements.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/Statements.java @@ -13,125 +13,151 @@ import java.util.ServiceLoader; -public abstract class Statements { - - protected static StatementFactory factory; - - @SuppressWarnings( "unchecked" ) - protected static > StatementFactory getFactory() { - synchronized ( Statements.class ) { - ServiceLoader sl = ServiceLoader.load( StatementFactory.class, Statements.class.getClassLoader() ); - if ( sl.iterator().hasNext() ) { - factory = sl.iterator().next(); - } else { - throw new IllegalStateException( "No StatementFactory implementation available, unable to continue" ); - } - } - return factory; - } - - @SuppressWarnings( "unchecked" ) - public static > ReturnStatement newReturn() { - return (ReturnStatement) getFactory().newReturn(); - } - - @SuppressWarnings( "unchecked" ) - public static > IfStatement> newIf() { - return (IfStatement>) getFactory().newIf(); - } - - @SuppressWarnings( "unchecked" ) - public static > AssignmentStatement> newAssign() { - return (AssignmentStatement>) getFactory().newAssign(); - } - - @SuppressWarnings( "unchecked" ) - public static > DeclareStatement> newDeclare() { - return (DeclareStatement>) getFactory().newDeclare(); - } - - @SuppressWarnings( "unchecked" ) - public static > ForStatement> newFor() { - return (ForStatement>) getFactory().newFor(); - } - - @SuppressWarnings( "unchecked" ) - public static > ForEachStatement> newForEach() { - return (ForEachStatement>) getFactory().newForEach(); - } - - @SuppressWarnings( "unchecked" ) - public static > InvokeStatement> newInvoke() { - return (InvokeStatement>) getFactory().newInvoke(); - } - - @SuppressWarnings( "unchecked" ) - public static > WhileStatement> newWhile() { - return (WhileStatement>) getFactory().newWhile(); - } - - @SuppressWarnings( "unchecked" ) - public static > DoWhileStatement> newDoWhile() { - return (DoWhileStatement>) getFactory().newDoWhile(); - } - - @SuppressWarnings( "unchecked" ) - public static > BlockStatement> newBlock() { - return (BlockStatement>) getFactory().newBlock(); - } - - @SuppressWarnings( "unchecked" ) - public static > BreakStatement> newBreak() { - return (BreakStatement>) getFactory().newBreak(); - } - - @SuppressWarnings( "unchecked" ) - public static > ContinueStatement> newContinue() { - return (ContinueStatement>) getFactory().newContinue(); - } - - @SuppressWarnings( "unchecked" ) - public static > ThrowStatement> newThrow() { - return (ThrowStatement>) getFactory().newThrow(); - } - - @SuppressWarnings( "unchecked" ) - public static > TryCatchStatement> newTryCatch() { - return (TryCatchStatement>) getFactory().newTryCatch(); - } - - @SuppressWarnings( "unchecked" ) - public static > SynchStatement> newSynchronized() { - return (SynchStatement>) getFactory().newSynchronized(); - } - - @SuppressWarnings( "unchecked" ) - public static > ThisStatement> newThis() { - return (ThisStatement>) getFactory().newThis(); - } - - @SuppressWarnings( "unchecked" ) - public static > SuperStatement> newSuper() { - return (SuperStatement>) getFactory().newSuper(); - } - - @SuppressWarnings( "unchecked" ) - public static > AssertStatement> newAssert() { - return (AssertStatement>) getFactory().newAssert(); - } - - @SuppressWarnings( "unchecked" ) - public static > SwitchStatement> newSwitch() { - return (SwitchStatement>) getFactory().newSwitch(); - } - - @SuppressWarnings( "unchecked" ) - public static > EvalExpressionStatement> newEval() { - return (EvalExpressionStatement>) getFactory().newEval(); - } - - public static > SwitchCaseStatement>> newCase() { - return (SwitchCaseStatement>>) getFactory().newCase(); - } +public abstract class Statements +{ + + protected static StatementFactory factory; + + @SuppressWarnings("unchecked") + protected static > StatementFactory getFactory() + { + synchronized (Statements.class) + { + ServiceLoader sl = ServiceLoader.load(StatementFactory.class, Statements.class.getClassLoader()); + if (sl.iterator().hasNext()) + { + factory = sl.iterator().next(); + } else + { + throw new IllegalStateException("No StatementFactory implementation available, unable to continue"); + } + } + return factory; + } + + @SuppressWarnings("unchecked") + public static > ReturnStatement newReturn() + { + return (ReturnStatement) getFactory().newReturn(); + } + + @SuppressWarnings("unchecked") + public static > IfStatement> newIf() + { + return (IfStatement>) getFactory().newIf(); + } + + @SuppressWarnings("unchecked") + public static > AssignmentStatement> newAssign() + { + return (AssignmentStatement>) getFactory().newAssign(); + } + + @SuppressWarnings("unchecked") + public static > DeclareStatement> newDeclare() + { + return (DeclareStatement>) getFactory().newDeclare(); + } + + @SuppressWarnings("unchecked") + public static > ForStatement> newFor() + { + return (ForStatement>) getFactory().newFor(); + } + + @SuppressWarnings("unchecked") + public static > ForEachStatement> newForEach() + { + return (ForEachStatement>) getFactory().newForEach(); + } + + @SuppressWarnings("unchecked") + public static > InvokeStatement> newInvoke() + { + return (InvokeStatement>) getFactory().newInvoke(); + } + + @SuppressWarnings("unchecked") + public static > WhileStatement> newWhile() + { + return (WhileStatement>) getFactory().newWhile(); + } + + @SuppressWarnings("unchecked") + public static > DoWhileStatement> newDoWhile() + { + return (DoWhileStatement>) getFactory().newDoWhile(); + } + + @SuppressWarnings("unchecked") + public static > BlockStatement> newBlock() + { + return (BlockStatement>) getFactory().newBlock(); + } + + @SuppressWarnings("unchecked") + public static > BreakStatement> newBreak() + { + return (BreakStatement>) getFactory().newBreak(); + } + + @SuppressWarnings("unchecked") + public static > ContinueStatement> newContinue() + { + return (ContinueStatement>) getFactory().newContinue(); + } + + @SuppressWarnings("unchecked") + public static > ThrowStatement> newThrow() + { + return (ThrowStatement>) getFactory().newThrow(); + } + + @SuppressWarnings("unchecked") + public static > TryCatchStatement> newTryCatch() + { + return (TryCatchStatement>) getFactory().newTryCatch(); + } + + @SuppressWarnings("unchecked") + public static > SynchStatement> newSynchronized() + { + return (SynchStatement>) getFactory().newSynchronized(); + } + + @SuppressWarnings("unchecked") + public static > ThisStatement> newThis() + { + return (ThisStatement>) getFactory().newThis(); + } + + @SuppressWarnings("unchecked") + public static > SuperStatement> newSuper() + { + return (SuperStatement>) getFactory().newSuper(); + } + + @SuppressWarnings("unchecked") + public static > AssertStatement> newAssert() + { + return (AssertStatement>) getFactory().newAssert(); + } + + @SuppressWarnings("unchecked") + public static > SwitchStatement> newSwitch() + { + return (SwitchStatement>) getFactory().newSwitch(); + } + + @SuppressWarnings("unchecked") + public static > EvalExpressionStatement> newEval() + { + return (EvalExpressionStatement>) getFactory().newEval(); + } + + public static > SwitchCaseStatement>> newCase() + { + return (SwitchCaseStatement>>) getFactory().newCase(); + } } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/SuperStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/SuperStatement.java index 4f520323..bbdbf18c 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/SuperStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/SuperStatement.java @@ -14,11 +14,12 @@ import java.util.List; public interface SuperStatement, - P extends BlockHolder> - extends StatementSource> { + P extends BlockHolder> + extends StatementSource> +{ - public List,?>> getArguments(); + public List,?>> getArguments(); - public SuperStatement addArgument( Argument argument ); + public SuperStatement addArgument(Argument argument); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/SwitchCaseStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/SwitchCaseStatement.java index 17272c4e..ec7bc23c 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/SwitchCaseStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/SwitchCaseStatement.java @@ -12,11 +12,12 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface SwitchCaseStatement, - P extends SwitchStatement>> - extends StatementSource> { + P extends SwitchStatement>> + extends StatementSource> +{ - public ExpressionSource,?> getCaseExpression(); + public ExpressionSource,?> getCaseExpression(); - public SwitchCaseStatement setCaseExpression( ExpressionSource src ); + public SwitchCaseStatement setCaseExpression(ExpressionSource src); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/SwitchStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/SwitchStatement.java index 0e6ce3f4..4764bcc9 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/SwitchStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/SwitchStatement.java @@ -14,26 +14,27 @@ import java.util.List; public interface SwitchStatement, - P extends BlockHolder> - extends ControlFlowStatement>, - BodyHolder> { + P extends BlockHolder> + extends ControlFlowStatement>, + BodyHolder> +{ - public List,?>> getCaseExpressions(); + public List,?>> getCaseExpressions(); - public SwitchStatement addCase( ExpressionSource option ); + public SwitchStatement addCase(ExpressionSource option); - public SwitchStatement addCase( SwitchCaseStatement option ); + public SwitchStatement addCase(SwitchCaseStatement option); - public SwitchStatement addDefault(); + public SwitchStatement addDefault(); - public List,?>> getStatements(); + public List,?>> getStatements(); - public SwitchStatement addStatement( StatementSource arg ); + public SwitchStatement addStatement(StatementSource arg); - public ExpressionSource,?> getSwitch(); + public ExpressionSource,?> getSwitch(); - public SwitchStatement setSwitch( ExpressionSource expr ); + public SwitchStatement setSwitch(ExpressionSource expr); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/SynchStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/SynchStatement.java index c2e9a8a0..86f82820 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/SynchStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/SynchStatement.java @@ -11,13 +11,14 @@ import org.jboss.forge.roaster.model.source.BlockHolder; import org.jboss.forge.roaster.model.source.JavaSource; -public interface SynchStatement, - P extends BlockHolder> - extends ControlFlowStatement>, - BodyHolder> { +public interface SynchStatement, + P extends BlockHolder> + extends ControlFlowStatement>, + BodyHolder> +{ - public ExpressionSource,?> getSynchOn(); + public ExpressionSource,?> getSynchOn(); - public SynchStatement setSynchOn( ExpressionSource expr ); + public SynchStatement setSynchOn(ExpressionSource expr); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/ThisStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/ThisStatement.java index b5e837e7..e3e6f642 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/ThisStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/ThisStatement.java @@ -14,11 +14,12 @@ import java.util.List; public interface ThisStatement, - P extends BlockHolder> - extends StatementSource> { + P extends BlockHolder> + extends StatementSource> +{ - public List,?>> getArguments(); + public List,?>> getArguments(); - public ThisStatement addArgument( Argument argument ); + public ThisStatement addArgument(Argument argument); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/ThrowStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/ThrowStatement.java index 3b4c2dc6..b7c8527b 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/ThrowStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/ThrowStatement.java @@ -12,11 +12,12 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface ThrowStatement, - P extends BlockHolder> - extends ControlFlowStatement> { + P extends BlockHolder> + extends ControlFlowStatement> +{ - public ExpressionSource,?> getThrowable(); + public ExpressionSource,?> getThrowable(); - public ThrowStatement setThrowable( ExpressionSource expr ); + public ThrowStatement setThrowable(ExpressionSource expr); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/TryCatchStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/TryCatchStatement.java index d5a49c4d..ec657a8a 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/TryCatchStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/TryCatchStatement.java @@ -14,23 +14,24 @@ import java.util.Map; public interface TryCatchStatement, - P extends BlockHolder> - extends ControlFlowStatement>, - BodyHolder> { + P extends BlockHolder> + extends ControlFlowStatement>, + BodyHolder> +{ - public Map>,BlockStatement>> getCatches(); + public Map>,BlockStatement>> getCatches(); - public TryCatchStatement addCatch( DeclareExpression declaration, - BlockStatement block ); + public TryCatchStatement addCatch(DeclareExpression declaration, + BlockStatement block); - public TryCatchStatement addCatch( DeclareExpression declaration, - StatementSource block ); + public TryCatchStatement addCatch(DeclareExpression declaration, + StatementSource block); - public BlockStatement> getFinally(); + public BlockStatement> getFinally(); - public TryCatchStatement setFinally( BlockStatement block ); + public TryCatchStatement setFinally(BlockStatement block); - public TryCatchStatement setFinally( StatementSource block ); + public TryCatchStatement setFinally(StatementSource block); } diff --git a/api/src/main/java/org/jboss/forge/roaster/model/statements/WhileStatement.java b/api/src/main/java/org/jboss/forge/roaster/model/statements/WhileStatement.java index c64a0845..feb21fce 100644 --- a/api/src/main/java/org/jboss/forge/roaster/model/statements/WhileStatement.java +++ b/api/src/main/java/org/jboss/forge/roaster/model/statements/WhileStatement.java @@ -12,12 +12,13 @@ import org.jboss.forge.roaster.model.source.JavaSource; public interface WhileStatement, - P extends BlockHolder> - extends LoopingStatement>, - BodyHolder> { + P extends BlockHolder> + extends LoopingStatement>, + BodyHolder> +{ - public ExpressionSource,?> getCondition(); + public ExpressionSource,?> getCondition(); - public WhileStatement setCondition( ExpressionSource expr ); + public WhileStatement setCondition(ExpressionSource expr); }