Package spoon.support.reflect.code
Class CtConstructorCallImpl<T>
java.lang.Object
spoon.support.reflect.declaration.CtElementImpl
spoon.support.reflect.code.CtCodeElementImpl
spoon.support.reflect.code.CtExpressionImpl<E>
spoon.support.reflect.code.CtTargetedExpressionImpl<T,CtExpression<?>>
spoon.support.reflect.code.CtConstructorCallImpl<T>
- All Implemented Interfaces:
Serializable,Cloneable,FactoryAccessor,CtAbstractInvocation<T>,CtCodeElement,CtConstructorCall<T>,CtExpression<T>,CtStatement,CtTargetedExpression<T,CtExpression<?>>,SourcePositionHolder,CtElement,CtTypedElement<T>,CtActualTypeContainer,CtQueryable,CtVisitable,TemplateParameter<T>
- Direct Known Subclasses:
CtNewClassImpl
public class CtConstructorCallImpl<T>
extends CtTargetedExpressionImpl<T,CtExpression<?>>
implements CtConstructorCall<T>
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class spoon.support.reflect.declaration.CtElementImpl
ERROR_MESSAGE_TO_STRING, factory, LOGGER, parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAccepts a visitor<T extends CtActualTypeContainer>
TaddActualTypeArgument(CtTypeReference<?> actualTypeArgument)Delegate to the executable reference of the constructor call.<C extends CtAbstractInvocation<T>>
CaddArgument(CtExpression<?> argument)Adds an argument expression to the invocation.<C extends CtAbstractInvocation<T>>
CaddArgumentAt(int position, CtExpression<?> argument)Adds an argument expression to the invocation at the specified position.clone()Clone the element which calls this method in a new object.List<CtTypeReference<?>>Delegate to the executable reference of the constructor call.List<CtExpression<?>>The arguments of the invocation.Returns the invoked executable.getLabel()Gets the label of this statement if defined.getType()Gets this element's type.<C extends CtStatement>
CinsertAfter(CtStatement statement)Inserts a statement after the current statement.<C extends CtStatement>
CinsertAfter(CtStatementList statements)Inserts a statement list before the current statement.<C extends CtStatement>
CinsertBefore(CtStatement statement)Inserts a statement given as parameter before the current statement (this).<C extends CtStatement>
CinsertBefore(CtStatementList statements)Inserts a statement list before the current statement.booleanremoveActualTypeArgument(CtTypeReference<?> actualTypeArgument)Removes a type argument.voidremoveArgument(CtExpression<?> argument)Removes an argument expression from the invocation.<T extends CtActualTypeContainer>
TsetActualTypeArguments(List<? extends CtTypeReference<?>> actualTypeArguments)Delegate to the executable reference of the constructor call.<C extends CtAbstractInvocation<T>>
CsetArguments(List<CtExpression<?>> arguments)Sets the invocation's arguments.<C extends CtAbstractInvocation<T>>
CsetExecutable(CtExecutableReference<T> executable)Sets the invoked executable.<C extends CtStatement>
CSets the label of this statement.<C extends CtTypedElement>
CsetType(CtTypeReference type)Sets this element's type.Methods inherited from class spoon.support.reflect.code.CtTargetedExpressionImpl
getTarget, setTargetMethods inherited from class spoon.support.reflect.code.CtExpressionImpl
addTypeCast, getTypeCasts, S, setTypeCastsMethods inherited from class spoon.support.reflect.code.CtCodeElementImpl
partiallyEvaluateMethods inherited from class spoon.support.reflect.declaration.CtElementImpl
addAnnotation, addComment, asIterable, comment, delete, descendantIterator, emptyList, emptySet, equals, filterChildren, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getFactory, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hashCode, hasParent, isImplicit, isParentInitialized, map, map, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setFactory, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, unmodifiableList, updateAllParentsBelowMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface spoon.reflect.code.CtCodeElement
partiallyEvaluateMethods inherited from interface spoon.reflect.declaration.CtElement
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, updateAllParentsBelowMethods inherited from interface spoon.reflect.code.CtExpression
addTypeCast, getTypeCasts, setTypeCastsMethods inherited from interface spoon.reflect.visitor.chain.CtQueryable
filterChildren, map, mapMethods inherited from interface spoon.reflect.code.CtStatement
commentMethods inherited from interface spoon.reflect.code.CtTargetedExpression
getTarget, setTargetMethods inherited from interface spoon.processing.FactoryAccessor
getFactory, setFactoryMethods inherited from interface spoon.template.TemplateParameter
S
-
Constructor Details
-
CtConstructorCallImpl
public CtConstructorCallImpl()
-
-
Method Details
-
accept
Description copied from interface:CtVisitableAccepts a visitor- Specified by:
acceptin interfaceCtVisitable
-
getArguments
Description copied from interface:CtAbstractInvocationThe arguments of the invocation.- Specified by:
getArgumentsin interfaceCtAbstractInvocation<T>- Returns:
- the expressions that define the values of the arguments
-
getExecutable
Description copied from interface:CtAbstractInvocationReturns the invoked executable.- Specified by:
getExecutablein interfaceCtAbstractInvocation<T>
-
getLabel
Description copied from interface:CtStatementGets the label of this statement if defined.- Specified by:
getLabelin interfaceCtStatement- Returns:
- the label's name (null if undefined)
-
insertAfter
Description copied from interface:CtStatementInserts a statement after the current statement.- Specified by:
insertAfterin interfaceCtStatement
-
insertBefore
Description copied from interface:CtStatementInserts a statement given as parameter before the current statement (this).- Specified by:
insertBeforein interfaceCtStatement
-
insertAfter
Description copied from interface:CtStatementInserts a statement list before the current statement.- Specified by:
insertAfterin interfaceCtStatement
-
insertBefore
Description copied from interface:CtStatementInserts a statement list before the current statement.- Specified by:
insertBeforein interfaceCtStatement
-
setArguments
Description copied from interface:CtAbstractInvocationSets the invocation's arguments.- Specified by:
setArgumentsin interfaceCtAbstractInvocation<T>
-
addArgument
Description copied from interface:CtAbstractInvocationAdds an argument expression to the invocation.- Specified by:
addArgumentin interfaceCtAbstractInvocation<T>
-
addArgumentAt
Description copied from interface:CtAbstractInvocationAdds an argument expression to the invocation at the specified position.- Specified by:
addArgumentAtin interfaceCtAbstractInvocation<T>- Parameters:
position- position to add the argument at.argument- argument to add.- Returns:
- the receiver.
-
removeArgument
Description copied from interface:CtAbstractInvocationRemoves an argument expression from the invocation.- Specified by:
removeArgumentin interfaceCtAbstractInvocation<T>
-
setExecutable
Description copied from interface:CtAbstractInvocationSets the invoked executable.- Specified by:
setExecutablein interfaceCtAbstractInvocation<T>
-
setLabel
Description copied from interface:CtStatementSets the label of this statement.- Specified by:
setLabelin interfaceCtStatement
-
getActualTypeArguments
Description copied from interface:CtConstructorCallDelegate to the executable reference of the constructor call.- Specified by:
getActualTypeArgumentsin interfaceCtActualTypeContainer- Specified by:
getActualTypeArgumentsin interfaceCtConstructorCall<T>- See Also:
CtActualTypeContainer.getActualTypeArguments()
-
setActualTypeArguments
public <T extends CtActualTypeContainer> T setActualTypeArguments(List<? extends CtTypeReference<?>> actualTypeArguments)Description copied from interface:CtConstructorCallDelegate to the executable reference of the constructor call.- Specified by:
setActualTypeArgumentsin interfaceCtActualTypeContainer- Specified by:
setActualTypeArgumentsin interfaceCtConstructorCall<T>- See Also:
CtActualTypeContainer.getActualTypeArguments()
-
addActualTypeArgument
public <T extends CtActualTypeContainer> T addActualTypeArgument(CtTypeReference<?> actualTypeArgument)Description copied from interface:CtConstructorCallDelegate to the executable reference of the constructor call.- Specified by:
addActualTypeArgumentin interfaceCtActualTypeContainer- Specified by:
addActualTypeArgumentin interfaceCtConstructorCall<T>- See Also:
CtActualTypeContainer.getActualTypeArguments()
-
removeActualTypeArgument
Description copied from interface:CtActualTypeContainerRemoves a type argument.- Specified by:
removeActualTypeArgumentin interfaceCtActualTypeContainer
-
getType
Description copied from interface:CtTypedElementGets this element's type.- Specified by:
getTypein interfaceCtConstructorCall<T>- Specified by:
getTypein interfaceCtTypedElement<T>- Overrides:
getTypein classCtExpressionImpl<T>
-
setType
Description copied from interface:CtTypedElementSets this element's type.- Specified by:
setTypein interfaceCtTypedElement<T>- Overrides:
setTypein classCtExpressionImpl<T>
-
clone
Description copied from interface:CtElementClone the element which calls this method in a new object. Note that that references are kept as is, and thus, so if you clone whole classes or methods, some parts of the cloned element (eg executable references) may still point to the initial element. In this case, consider using methodsRefactoring.copyType(CtType)andRefactoring.copyMethod(CtMethod)instead which does additional work beyond cloning.- Specified by:
clonein interfaceCtCodeElement- Specified by:
clonein interfaceCtConstructorCall<T>- Specified by:
clonein interfaceCtElement- Specified by:
clonein interfaceCtExpression<T>- Specified by:
clonein interfaceCtStatement- Specified by:
clonein interfaceCtTargetedExpression<T,CtExpression<?>>- Overrides:
clonein classCtTargetedExpressionImpl<T,CtExpression<?>>
-