-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Copyright Conflicts: api/src/main/java/org/jboss/forge/roaster/model/source/MethodSource.java impl/src/main/java/org/jboss/forge/roaster/model/impl/AnnotationImpl.java impl/src/main/java/org/jboss/forge/roaster/model/impl/MethodImpl.java Conflicts: impl/src/main/java/org/jboss/forge/roaster/model/impl/MethodImpl.java
- Loading branch information
Showing
178 changed files
with
11,024 additions
and
22 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
api/src/main/java/org/jboss/forge/roaster/model/Block.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model; | ||
|
||
import org.jboss.forge.roaster.Origin; | ||
import org.jboss.forge.roaster.model.source.BlockHolder; | ||
|
||
public interface Block<O extends JavaType<O>, | ||
P extends BlockHolder<O>> | ||
extends Origin<P>, | ||
BlockHolder<O> { | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
api/src/main/java/org/jboss/forge/roaster/model/ExpressionHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model; | ||
|
||
public interface ExpressionHolder<O extends JavaType<O>> { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
api/src/main/java/org/jboss/forge/roaster/model/expressions/AccessBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
public interface AccessBuilder<O extends JavaSource<O>, | ||
P extends ExpressionHolder<O>, | ||
E extends NonPrimitiveExpression<O,P,E>> { | ||
|
||
public Field<O,E> field( String field ); | ||
|
||
public Getter<O,E> getter( String field, String klass ); | ||
|
||
public Getter<O,E> getter( String field, Class klass ); | ||
|
||
public Setter<O,E> setter( String fldName, String type, ExpressionSource<?,?,?> value ); | ||
|
||
public Setter<O,E> setter( String fldName, Class type, ExpressionSource<?,?,?> value ); | ||
|
||
public MethodCallExpression<O,E> invoke( String method ); | ||
|
||
public ArrayIndexer<O,E> itemAt( ExpressionSource<?,?,?> index ); | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
api/src/main/java/org/jboss/forge/roaster/model/expressions/Accessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
public interface Accessor<O extends JavaSource<O>, | ||
P extends ExpressionHolder<O>, | ||
E extends NonPrimitiveExpression<O,P,E>> | ||
extends Argument<O,P,E>, | ||
AccessBuilder<O,P,E> { | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
api/src/main/java/org/jboss/forge/roaster/model/expressions/Argument.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
public interface Argument<O extends JavaSource<O>, | ||
P extends ExpressionHolder<O>, | ||
E extends ExpressionSource<O,P,E>> | ||
extends ExpressionSource<O,P,E> { | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
api/src/main/java/org/jboss/forge/roaster/model/expressions/ArgumentHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
import java.util.List; | ||
|
||
public interface ArgumentHolder<O extends JavaSource<O>, | ||
P extends ExpressionHolder<O>, | ||
E extends NonPrimitiveExpression<O,P,?>> | ||
extends ExpressionHolder<O> { | ||
|
||
public E addArgument( Argument<?,?,?> arg ); | ||
|
||
public List<Argument<O,E,?>> getArguments(); | ||
} |
29 changes: 29 additions & 0 deletions
29
api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayConstructorExpression.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
import java.util.List; | ||
|
||
public interface ArrayConstructorExpression<O extends JavaSource<O>, | ||
P extends ExpressionHolder<O>> | ||
extends Argument<O,P,ArrayConstructorExpression<O,P>>, | ||
NonPrimitiveExpression<O,P,ArrayConstructorExpression<O,P>> { | ||
|
||
public ArrayConstructorExpression<O,P> addDimension( ExpressionSource<?,?,?> dim ); | ||
|
||
public ArrayConstructorExpression<O,P> init( ArrayInit<?,?> array ); | ||
|
||
public ArrayInit<O,ArrayConstructorExpression<O,P>> getInit(); | ||
|
||
public List<ExpressionSource<O,ArrayConstructorExpression<O,P>,?>> getDimensions(); | ||
|
||
public int getDimension(); | ||
} |
24 changes: 24 additions & 0 deletions
24
api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayIndexer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
public interface ArrayIndexer<O extends JavaSource<O>,P extends ExpressionHolder<O>> | ||
extends OrdinalArgument<O,P,ArrayIndexer<O,P>>, | ||
NonPrimitiveExpression<O,P,ArrayIndexer<O,P>> { | ||
|
||
public ExpressionSource<O,ArrayIndexer<O,P>,?> getIndex(); | ||
|
||
public ArrayIndexer<O,P> setIndex( ExpressionSource<?,?,?> index ); | ||
|
||
public ExpressionSource<O,ArrayIndexer<O,P>,?> getTarget(); | ||
|
||
public ArrayIndexer<O,P> setTarget( ExpressionSource<?,?,?> target ); | ||
} |
30 changes: 30 additions & 0 deletions
30
api/src/main/java/org/jboss/forge/roaster/model/expressions/ArrayInit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
import java.util.List; | ||
|
||
public interface ArrayInit<O extends JavaSource<O>,P extends ExpressionHolder<O>> | ||
extends ExpressionSource<O,P,ArrayInit<O,P>>, | ||
NonPrimitiveExpression<O,P,ArrayInit<O,P>> { | ||
|
||
public ArrayInit<O,P> addElement( ArrayInit<?,?> subRow ); | ||
|
||
public ArrayInit<O,P> addElement( ExpressionSource<?,?,?> subElement ); | ||
|
||
public List<ExpressionSource<O,ArrayInit<O,P>,?>> getElements(); | ||
|
||
public int size(); | ||
|
||
public int getDimension(); | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
api/src/main/java/org/jboss/forge/roaster/model/expressions/AssignExpression.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
public interface AssignExpression<O extends JavaSource<O>, | ||
P extends ExpressionHolder<O>> | ||
extends NonPrimitiveExpression<O,P,AssignExpression<O,P>>, | ||
Argument<O,P,AssignExpression<O,P>> { | ||
|
||
public String getOperator(); | ||
|
||
public AssignExpression<O,P> setOperator( Assignment op ); | ||
|
||
public Accessor<O,AssignExpression<O,P>,?> getLeft(); | ||
|
||
public AssignExpression<O,P> setLeft( Accessor<?,?,?> left ); | ||
|
||
public ExpressionSource<O,AssignExpression<O,P>,?> getRight(); | ||
|
||
public AssignExpression<O,P> setRight( ExpressionSource<?,?,?> right ); | ||
} |
46 changes: 46 additions & 0 deletions
46
api/src/main/java/org/jboss/forge/roaster/model/expressions/Assignment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
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 ); | ||
} | ||
|
||
} |
56 changes: 56 additions & 0 deletions
56
api/src/main/java/org/jboss/forge/roaster/model/expressions/BasicExpressionFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
public interface BasicExpressionFactory<O extends JavaSource<O>, | ||
P extends ExpressionHolder<O>> | ||
extends LiteralBuilder<O,P>, | ||
ConstructorBuilder<O,P> { | ||
|
||
public Variable<O,P> var( String varName ); | ||
|
||
public OperatorExpression<O,P> operator( Op op ); | ||
|
||
public UnaryExpression<O,P> operator( PrefixOp operator, Argument<O,?,?> arg ); | ||
|
||
public TernaryExpression<O,P> ternary(); | ||
|
||
public CastExpression<O,P> cast( String klass, ExpressionSource<O,?,?> arg ); | ||
|
||
public CastExpression<O,P> cast( Class klass, ExpressionSource<O,?,?> arg ); | ||
|
||
public ParenExpression<O,P> paren( ExpressionSource<O,?,?> inner ); | ||
|
||
public UnaryExpression<O,P> not( Argument<O,?,?> arg ); | ||
|
||
public AssignExpression<O,P> assign( Assignment operator ); | ||
|
||
public DeclareExpression<O,P> declare( String klass, String name ); | ||
|
||
public DeclareExpression<O,P> declare( Class klass, String name ); | ||
|
||
public DeclareExpression<O,P> declare( String klass, String name, ExpressionSource<O,?,?> init ); | ||
|
||
public DeclareExpression<O,P> declare( Class klass, String name, ExpressionSource<O,?,?> init ); | ||
|
||
public Accessor<O,P,?> classStatic( String klass ); | ||
|
||
public Accessor<O,P,?> classStatic( Class klass ); | ||
|
||
public InstanceofExpression<O,P> instanceOf( String klass, ExpressionSource<O,?,?> arg ); | ||
|
||
public InstanceofExpression<O,P> instanceOf( Class klass, ExpressionSource<O,?,?> arg ); | ||
|
||
public Super<O,P> sup(); | ||
|
||
public ArrayInit<O,ArrayConstructorExpression<O,P>> vec(); | ||
} |
19 changes: 19 additions & 0 deletions
19
api/src/main/java/org/jboss/forge/roaster/model/expressions/BooleanLiteral.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright 2014 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.roaster.model.expressions; | ||
|
||
|
||
import org.jboss.forge.roaster.model.ExpressionHolder; | ||
import org.jboss.forge.roaster.model.source.JavaSource; | ||
|
||
public interface BooleanLiteral<O extends JavaSource<O>, | ||
P extends ExpressionHolder<O>> | ||
extends PrimitiveLiteral<O,P> { | ||
|
||
public Boolean getValue(); | ||
} |
Oops, something went wrong.