Skip to content

Commit

Permalink
fix(role): rename CtRole.EXECUTABLE to CtRole.EXECUTABLE_REF
Browse files Browse the repository at this point in the history
  • Loading branch information
pvojtechovsky committed Oct 16, 2017
1 parent 49d9b78 commit a98f199
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions src/main/java/spoon/reflect/code/CtAbstractInvocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.List;

import static spoon.reflect.path.CtRole.ARGUMENT;
import static spoon.reflect.path.CtRole.EXECUTABLE;
import static spoon.reflect.path.CtRole.EXECUTABLE_REF;

/**
* This code element defines an abstract invocation on a
Expand Down Expand Up @@ -63,12 +63,12 @@ public interface CtAbstractInvocation<T> extends CtElement {
/**
* Returns the invoked executable.
*/
@PropertyGetter(role = EXECUTABLE)
@PropertyGetter(role = EXECUTABLE_REF)
CtExecutableReference<T> getExecutable();

/**
* Sets the invoked executable.
*/
@PropertySetter(role = EXECUTABLE)
@PropertySetter(role = EXECUTABLE_REF)
<C extends CtAbstractInvocation<T>> C setExecutable(CtExecutableReference<T> executable);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import spoon.reflect.annotations.PropertyGetter;
import spoon.reflect.annotations.PropertySetter;

import static spoon.reflect.path.CtRole.EXECUTABLE;
import static spoon.reflect.path.CtRole.EXECUTABLE_REF;

/**
* This abstract code element defines an expression which represents an executable reference.
Expand All @@ -41,13 +41,13 @@ public interface CtExecutableReferenceExpression<T, E extends CtExpression<?>> e
/**
* Gets the executable referenced by the expression.
*/
@PropertyGetter(role = EXECUTABLE)
@PropertyGetter(role = EXECUTABLE_REF)
CtExecutableReference<T> getExecutable();

/**
* Sets the executable will be referenced by the expression.
*/
@PropertySetter(role = EXECUTABLE)
@PropertySetter(role = EXECUTABLE_REF)
<C extends CtExecutableReferenceExpression<T, E>> C setExecutable(CtExecutableReference<T> executable);

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/spoon/reflect/path/CtRole.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public enum CtRole {
SUPER_TYPE,
NESTED_TYPE,
CONSTRUCTOR,
EXECUTABLE,
EXECUTABLE_REF,
METHOD,
ANNONYMOUS_EXECUTABLE,
FIELD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ public interface CtParameterReference<T> extends CtVariableReference<T> {
/**
* Gets the declaring executable of the referenced parameter.
*/
@PropertyGetter(role = CtRole.EXECUTABLE)
@PropertyGetter(role = CtRole.EXECUTABLE_REF)
CtExecutableReference<?> getDeclaringExecutable();

/**
* Sets the declaring executable of the referenced parameter.
*/
@PropertySetter(role = CtRole.EXECUTABLE)
@PropertySetter(role = CtRole.EXECUTABLE_REF)
<C extends CtParameterReference<T>> C setDeclaringExecutable(CtExecutableReference<?> executable);

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@

import static spoon.reflect.ModelElementContainerDefaultCapacities.PARAMETERS_CONTAINER_DEFAULT_CAPACITY;
import static spoon.reflect.path.CtRole.ARGUMENT;
import static spoon.reflect.path.CtRole.EXECUTABLE;
import static spoon.reflect.path.CtRole.EXECUTABLE_REF;
import static spoon.reflect.path.CtRole.LABEL;

public class CtConstructorCallImpl<T> extends CtTargetedExpressionImpl<T, CtExpression<?>> implements CtConstructorCall<T> {
private static final long serialVersionUID = 1L;

@MetamodelPropertyField(role = CtRole.ARGUMENT)
List<CtExpression<?>> arguments = emptyList();
@MetamodelPropertyField(role = CtRole.EXECUTABLE)
@MetamodelPropertyField(role = CtRole.EXECUTABLE_REF)
CtExecutableReference<T> executable;
@MetamodelPropertyField(role = CtRole.LABEL)
String label;
Expand Down Expand Up @@ -146,7 +146,7 @@ public <C extends CtAbstractInvocation<T>> C setExecutable(CtExecutableReference
if (executable != null) {
executable.setParent(this);
}
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, EXECUTABLE, executable, this.executable);
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, EXECUTABLE_REF, executable, this.executable);
this.executable = executable;
return (C) this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import spoon.reflect.reference.CtExecutableReference;
import spoon.reflect.visitor.CtVisitor;

import static spoon.reflect.path.CtRole.EXECUTABLE;
import static spoon.reflect.path.CtRole.EXECUTABLE_REF;

public class CtExecutableReferenceExpressionImpl<T, E extends CtExpression<?>> extends CtTargetedExpressionImpl<T, E> implements CtExecutableReferenceExpression<T, E> {
@MetamodelPropertyField(role = CtRole.EXECUTABLE)
@MetamodelPropertyField(role = CtRole.EXECUTABLE_REF)
CtExecutableReference<T> executable;

@Override
Expand All @@ -44,7 +44,7 @@ public <C extends CtExecutableReferenceExpression<T, E>> C setExecutable(CtExecu
if (executable != null) {
executable.setParent(this);
}
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, EXECUTABLE, executable, this.executable);
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, EXECUTABLE_REF, executable, this.executable);
this.executable = executable;
return (C) this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

import static spoon.reflect.ModelElementContainerDefaultCapacities.PARAMETERS_CONTAINER_DEFAULT_CAPACITY;
import static spoon.reflect.path.CtRole.ARGUMENT;
import static spoon.reflect.path.CtRole.EXECUTABLE;
import static spoon.reflect.path.CtRole.EXECUTABLE_REF;
import static spoon.reflect.path.CtRole.LABEL;

public class CtInvocationImpl<T> extends CtTargetedExpressionImpl<T, CtExpression<?>> implements CtInvocation<T> {
Expand All @@ -49,7 +49,7 @@ public class CtInvocationImpl<T> extends CtTargetedExpressionImpl<T, CtExpressio
@MetamodelPropertyField(role = CtRole.ARGUMENT)
List<CtExpression<?>> arguments = emptyList();

@MetamodelPropertyField(role = CtRole.EXECUTABLE)
@MetamodelPropertyField(role = CtRole.EXECUTABLE_REF)
CtExecutableReference<T> executable;

@Override
Expand Down Expand Up @@ -144,7 +144,7 @@ public <C extends CtAbstractInvocation<T>> C setExecutable(CtExecutableReference
if (executable != null) {
executable.setParent(this);
}
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, EXECUTABLE, executable, this.executable);
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, EXECUTABLE_REF, executable, this.executable);
this.executable = executable;
return (C) this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

import java.util.List;

import static spoon.reflect.path.CtRole.EXECUTABLE;
import static spoon.reflect.path.CtRole.EXECUTABLE_REF;

public class CtParameterReferenceImpl<T> extends CtVariableReferenceImpl<T> implements CtParameterReference<T> {
private static final long serialVersionUID = 1L;

@MetamodelPropertyField(role = CtRole.EXECUTABLE)
@MetamodelPropertyField(role = CtRole.EXECUTABLE_REF)
CtExecutableReference<?> executable;

public CtParameterReferenceImpl() {
Expand Down Expand Up @@ -102,7 +102,7 @@ public <C extends CtParameterReference<T>> C setDeclaringExecutable(CtExecutable
if (executable != null) {
executable.setParent(this);
}
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, EXECUTABLE, executable, this.executable);
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, EXECUTABLE_REF, executable, this.executable);
this.executable = executable;
return (C) this;
}
Expand Down

0 comments on commit a98f199

Please sign in to comment.