Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Jun 9, 2017
1 parent a24ef8b commit f25e3b2
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/main/java/spoon/reflect/code/CtLiteral.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import spoon.reflect.annotations.PropertyGetter;
import spoon.reflect.annotations.PropertySetter;

import static spoon.reflect.path.CtRole.EXPRESSION;
import static spoon.reflect.path.CtRole.VALUE;

/**
* This code element defines a literal value (an int, a string, etc).
Expand All @@ -37,13 +37,13 @@ public interface CtLiteral<T> extends CtExpression<T> {
/**
* Gets the actual value of the literal (statically known).
*/
@PropertyGetter(role = EXPRESSION)
@PropertyGetter(role = VALUE)
T getValue();

/**
* Sets the actual value of the literal.
*/
@PropertySetter(role = EXPRESSION)
@PropertySetter(role = VALUE)
<C extends CtLiteral<T>> C setValue(T value);

/** Overriding return type, a clone of a CtLiteral returns a CtLiteral */
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/spoon/reflect/code/CtNewClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import java.util.List;

import static spoon.reflect.path.CtRole.EXPRESSION;
import static spoon.reflect.path.CtRole.TYPE_PARAMETER;

/**
Expand Down Expand Up @@ -76,11 +77,13 @@ public interface CtNewClass<T> extends CtConstructorCall<T> {
/**
* Gets the created class.
*/
@PropertyGetter(role = EXPRESSION)
CtClass<?> getAnonymousClass();

/**
* Sets the created class.
*/
@PropertySetter(role = EXPRESSION)
<N extends CtNewClass> N setAnonymousClass(CtClass<?> anonymousClass);

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/spoon/reflect/code/CtSynchronized.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public interface CtSynchronized extends CtStatement {
/**
* Sets the synchronized block.
*/
@PropertyGetter(role = BODY)
@PropertySetter(role = BODY)
<T extends CtSynchronized> T setBlock(CtBlock<?> block);

@Override
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/spoon/reflect/declaration/CtCodeSnippet.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package spoon.reflect.declaration;

import spoon.reflect.annotations.PropertyGetter;
import spoon.reflect.annotations.PropertySetter;

import static spoon.reflect.path.CtRole.EXPRESSION;
Expand All @@ -35,7 +36,7 @@ public interface CtCodeSnippet {
/**
* Sets the textual value of the code.
*/
@PropertySetter(role = EXPRESSION)
@PropertyGetter(role = EXPRESSION)
<C extends CtCodeSnippet> C setValue(String value);

/**
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/spoon/reflect/declaration/CtPackage.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ public interface CtPackage extends CtNamedElement, CtShadowable {
/**
* Adds a type to this package.
*/
@PropertySetter(role = TYPE)
<T extends CtPackage> T addType(CtType<?> type);

/**
* Removes a type from this package.
*/
@PropertySetter(role = TYPE)
void removeType(CtType<?> type);

/**
Expand All @@ -128,6 +130,7 @@ public interface CtPackage extends CtNamedElement, CtShadowable {
* @param pack
* @return <tt>true</tt> if this element changed as a result of the call
*/
@PropertySetter(role = SUB_PACKAGE)
boolean removePackage(CtPackage pack);

/**
Expand All @@ -136,7 +139,7 @@ public interface CtPackage extends CtNamedElement, CtShadowable {
* @param types
* new Set of types
*/
@PropertyGetter(role = TYPE)
@PropertySetter(role = TYPE)
<T extends CtPackage> T setTypes(Set<CtType<?>> types);

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/spoon/support/reflect/code/CtAssertImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class CtAssertImpl<T> extends CtStatementImpl implements CtAssert<T> {
@MetamodelPropertyField(role = CtRole.CONDITION)
CtExpression<Boolean> asserted;

@MetamodelPropertyField(role = CtRole.VALUE)
@MetamodelPropertyField(role = CtRole.EXPRESSION)
CtExpression<T> value;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void accept(CtVisitor visitor) {
visitor.visitCtCodeSnippetExpression(this);
}

@MetamodelPropertyField(role = CtRole.VALUE)
@MetamodelPropertyField(role = CtRole.EXPRESSION)
String value;

public String getValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void accept(CtVisitor visitor) {
visitor.visitCtCodeSnippetStatement(this);
}

@MetamodelPropertyField(role = CtRole.VALUE)
@MetamodelPropertyField(role = CtRole.EXPRESSION)
String value;

public String getValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class CtCommentImpl extends CtStatementImpl implements CtComment {
@MetamodelPropertyField(role = CtRole.COMMENT_CONTENT)
private String content;

@MetamodelPropertyField(role = CtRole.TYPE)
@MetamodelPropertyField(role = CtRole.COMMENT_TYPE)
private CommentType type;

@Override
Expand Down

0 comments on commit f25e3b2

Please sign in to comment.