From a98f1999cfa4be4eaa44f83229cfe7aec81bc76b Mon Sep 17 00:00:00 2001 From: Pavel Vojtechovsky Date: Sun, 15 Oct 2017 21:30:54 +0200 Subject: [PATCH] fix(role): rename CtRole.EXECUTABLE to CtRole.EXECUTABLE_REF --- src/main/java/spoon/reflect/code/CtAbstractInvocation.java | 6 +++--- .../spoon/reflect/code/CtExecutableReferenceExpression.java | 6 +++--- src/main/java/spoon/reflect/path/CtRole.java | 2 +- .../java/spoon/reflect/reference/CtParameterReference.java | 4 ++-- .../spoon/support/reflect/code/CtConstructorCallImpl.java | 6 +++--- .../reflect/code/CtExecutableReferenceExpressionImpl.java | 6 +++--- .../java/spoon/support/reflect/code/CtInvocationImpl.java | 6 +++--- .../support/reflect/reference/CtParameterReferenceImpl.java | 6 +++--- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/main/java/spoon/reflect/code/CtAbstractInvocation.java b/src/main/java/spoon/reflect/code/CtAbstractInvocation.java index d2b24fc45b6..7accd07bb76 100644 --- a/src/main/java/spoon/reflect/code/CtAbstractInvocation.java +++ b/src/main/java/spoon/reflect/code/CtAbstractInvocation.java @@ -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 @@ -63,12 +63,12 @@ public interface CtAbstractInvocation extends CtElement { /** * Returns the invoked executable. */ - @PropertyGetter(role = EXECUTABLE) + @PropertyGetter(role = EXECUTABLE_REF) CtExecutableReference getExecutable(); /** * Sets the invoked executable. */ - @PropertySetter(role = EXECUTABLE) + @PropertySetter(role = EXECUTABLE_REF) > C setExecutable(CtExecutableReference executable); } diff --git a/src/main/java/spoon/reflect/code/CtExecutableReferenceExpression.java b/src/main/java/spoon/reflect/code/CtExecutableReferenceExpression.java index a290e02cff7..df0c43e3b7c 100644 --- a/src/main/java/spoon/reflect/code/CtExecutableReferenceExpression.java +++ b/src/main/java/spoon/reflect/code/CtExecutableReferenceExpression.java @@ -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. @@ -41,13 +41,13 @@ public interface CtExecutableReferenceExpression> e /** * Gets the executable referenced by the expression. */ - @PropertyGetter(role = EXECUTABLE) + @PropertyGetter(role = EXECUTABLE_REF) CtExecutableReference getExecutable(); /** * Sets the executable will be referenced by the expression. */ - @PropertySetter(role = EXECUTABLE) + @PropertySetter(role = EXECUTABLE_REF) > C setExecutable(CtExecutableReference executable); @Override diff --git a/src/main/java/spoon/reflect/path/CtRole.java b/src/main/java/spoon/reflect/path/CtRole.java index 4ee93b0443d..6b9534584f4 100644 --- a/src/main/java/spoon/reflect/path/CtRole.java +++ b/src/main/java/spoon/reflect/path/CtRole.java @@ -64,7 +64,7 @@ public enum CtRole { SUPER_TYPE, NESTED_TYPE, CONSTRUCTOR, - EXECUTABLE, + EXECUTABLE_REF, METHOD, ANNONYMOUS_EXECUTABLE, FIELD, diff --git a/src/main/java/spoon/reflect/reference/CtParameterReference.java b/src/main/java/spoon/reflect/reference/CtParameterReference.java index 0d3b2177d84..0bc058314c4 100644 --- a/src/main/java/spoon/reflect/reference/CtParameterReference.java +++ b/src/main/java/spoon/reflect/reference/CtParameterReference.java @@ -32,13 +32,13 @@ public interface CtParameterReference extends CtVariableReference { /** * 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 setDeclaringExecutable(CtExecutableReference executable); @Override diff --git a/src/main/java/spoon/support/reflect/code/CtConstructorCallImpl.java b/src/main/java/spoon/support/reflect/code/CtConstructorCallImpl.java index fdffdf7608f..3ab1780419c 100644 --- a/src/main/java/spoon/support/reflect/code/CtConstructorCallImpl.java +++ b/src/main/java/spoon/support/reflect/code/CtConstructorCallImpl.java @@ -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 CtConstructorCallImpl extends CtTargetedExpressionImpl> implements CtConstructorCall { @@ -45,7 +45,7 @@ public class CtConstructorCallImpl extends CtTargetedExpressionImpl> arguments = emptyList(); - @MetamodelPropertyField(role = CtRole.EXECUTABLE) + @MetamodelPropertyField(role = CtRole.EXECUTABLE_REF) CtExecutableReference executable; @MetamodelPropertyField(role = CtRole.LABEL) String label; @@ -146,7 +146,7 @@ public > 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; } diff --git a/src/main/java/spoon/support/reflect/code/CtExecutableReferenceExpressionImpl.java b/src/main/java/spoon/support/reflect/code/CtExecutableReferenceExpressionImpl.java index 207d4d9ee46..dddba6ca9be 100644 --- a/src/main/java/spoon/support/reflect/code/CtExecutableReferenceExpressionImpl.java +++ b/src/main/java/spoon/support/reflect/code/CtExecutableReferenceExpressionImpl.java @@ -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> extends CtTargetedExpressionImpl implements CtExecutableReferenceExpression { - @MetamodelPropertyField(role = CtRole.EXECUTABLE) + @MetamodelPropertyField(role = CtRole.EXECUTABLE_REF) CtExecutableReference executable; @Override @@ -44,7 +44,7 @@ public > 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; } diff --git a/src/main/java/spoon/support/reflect/code/CtInvocationImpl.java b/src/main/java/spoon/support/reflect/code/CtInvocationImpl.java index 2500d976a20..404d333c8f7 100644 --- a/src/main/java/spoon/support/reflect/code/CtInvocationImpl.java +++ b/src/main/java/spoon/support/reflect/code/CtInvocationImpl.java @@ -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 extends CtTargetedExpressionImpl> implements CtInvocation { @@ -49,7 +49,7 @@ public class CtInvocationImpl extends CtTargetedExpressionImpl> arguments = emptyList(); - @MetamodelPropertyField(role = CtRole.EXECUTABLE) + @MetamodelPropertyField(role = CtRole.EXECUTABLE_REF) CtExecutableReference executable; @Override @@ -144,7 +144,7 @@ public > 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; } diff --git a/src/main/java/spoon/support/reflect/reference/CtParameterReferenceImpl.java b/src/main/java/spoon/support/reflect/reference/CtParameterReferenceImpl.java index 606d15d30ba..5cc55be9aff 100644 --- a/src/main/java/spoon/support/reflect/reference/CtParameterReferenceImpl.java +++ b/src/main/java/spoon/support/reflect/reference/CtParameterReferenceImpl.java @@ -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 extends CtVariableReferenceImpl implements CtParameterReference { private static final long serialVersionUID = 1L; - @MetamodelPropertyField(role = CtRole.EXECUTABLE) + @MetamodelPropertyField(role = CtRole.EXECUTABLE_REF) CtExecutableReference executable; public CtParameterReferenceImpl() { @@ -102,7 +102,7 @@ public > 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; }