Package spoon.reflect.code
Interface CtAbstractInvocation<T>
- Type Parameters:
T
- Return type of this invocation
- All Superinterfaces:
Cloneable
,CtElement
,CtQueryable
,CtVisitable
,FactoryAccessor
,Serializable
,SourcePositionHolder
- All Known Subinterfaces:
CtConstructorCall<T>
,CtInvocation<T>
,CtNewClass<T>
- All Known Implementing Classes:
CtConstructorCallImpl
,CtInvocationImpl
,CtNewClassImpl
This code element defines an abstract invocation on a
CtExecutable
.-
Method Summary
Modifier and TypeMethodDescription<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.List<CtExpression<?>>
The arguments of the invocation.Returns the invoked executable.void
removeArgument(CtExpression<?> argument)
Removes an argument expression from the invocation.<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.Methods inherited from interface spoon.reflect.declaration.CtElement
addAnnotation, addComment, asIterable, clone, 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, updateAllParentsBelow
Methods inherited from interface spoon.reflect.visitor.chain.CtQueryable
filterChildren, map, map
Methods inherited from interface spoon.reflect.visitor.CtVisitable
accept
Methods inherited from interface spoon.processing.FactoryAccessor
getFactory, setFactory
-
Method Details
-
getArguments
List<CtExpression<?>> getArguments()The arguments of the invocation.- Returns:
- the expressions that define the values of the arguments
-
addArgument
Adds an argument expression to the invocation. -
addArgumentAt
Adds an argument expression to the invocation at the specified position.- Parameters:
position
- position to add the argument at.argument
- argument to add.- Returns:
- the receiver.
-
removeArgument
Removes an argument expression from the invocation. -
setArguments
Sets the invocation's arguments. -
getExecutable
CtExecutableReference<T> getExecutable()Returns the invoked executable. -
setExecutable
Sets the invoked executable.
-