public abstract class CtExecutableImpl<R> extends CtNamedElementImpl implements CtExecutable<R>
CtExecutable
.ERROR_MESSAGE_TO_STRING, LOGGER, parent
EXECUTABLE_SEPARATOR
Constructor and Description |
---|
CtExecutableImpl() |
Modifier and Type | Method and Description |
---|---|
<T extends CtExecutable<R>> |
addParameter(CtParameter<?> parameter)
Add a parameter for this executable
|
<T extends CtExecutable<R>> |
addThrownType(CtTypeReference<? extends Throwable> throwType)
add a thrown type.
|
CtExecutable<R> |
clone()
Clone the element which calls this method in a new object.
|
CtBlock<R> |
getBody()
Gets the body expression.
|
CtType<?> |
getDeclaringType() |
List<CtParameter<?>> |
getParameters()
Gets the parameters list.
|
CtExecutableReference<R> |
getReference()
Returns the corresponding reference.
|
String |
getSignature()
Gets the signature of this method or constructor.
|
Set<CtTypeReference<? extends Throwable>> |
getThrownTypes()
Returns the exceptions and other throwables listed in this method or
constructor's throws clause.
|
<T> CtType<T> |
getTopLevelType() |
boolean |
removeParameter(CtParameter<?> parameter)
Remove a parameter for this executable
|
boolean |
removeThrownType(CtTypeReference<? extends Throwable> throwType)
remove a thrown type.
|
<T extends CtBodyHolder> |
setBody(CtStatement statement)
Sets the body of this element.
|
<T extends CtExecutable<R>> |
setParameters(List<CtParameter<?>> parameters)
Sets the parameters.
|
<T extends CtExecutable<R>> |
setThrownTypes(Set<CtTypeReference<? extends Throwable>> thrownTypes)
Sets the thrown types.
|
getSimpleName, setSimpleName
addAnnotation, addComment, asIterable, 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, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setFactory, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, unmodifiableList, updateAllParentsBelow
finalize, getClass, notify, notifyAll, wait, wait, wait
getSimpleName, setSimpleName
getType, setType
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, updateAllParentsBelow
getFactory, setFactory
accept
filterChildren, map, map
getOriginalSourceFragment
public CtType<?> getDeclaringType()
public <T> CtType<T> getTopLevelType()
public CtBlock<R> getBody()
CtExecutable
getBody
in interface CtBodyHolder
getBody
in interface CtExecutable<R>
public <T extends CtBodyHolder> T setBody(CtStatement statement)
CtBodyHolder
setBody
in interface CtBodyHolder
public List<CtParameter<?>> getParameters()
CtExecutable
getParameters
in interface CtExecutable<R>
public <T extends CtExecutable<R>> T setParameters(List<CtParameter<?>> parameters)
CtExecutable
setParameters
in interface CtExecutable<R>
public <T extends CtExecutable<R>> T addParameter(CtParameter<?> parameter)
CtExecutable
addParameter
in interface CtExecutable<R>
public boolean removeParameter(CtParameter<?> parameter)
CtExecutable
removeParameter
in interface CtExecutable<R>
public Set<CtTypeReference<? extends Throwable>> getThrownTypes()
CtExecutable
getThrownTypes
in interface CtExecutable<R>
public <T extends CtExecutable<R>> T setThrownTypes(Set<CtTypeReference<? extends Throwable>> thrownTypes)
CtExecutable
setThrownTypes
in interface CtExecutable<R>
public <T extends CtExecutable<R>> T addThrownType(CtTypeReference<? extends Throwable> throwType)
CtExecutable
addThrownType
in interface CtExecutable<R>
public boolean removeThrownType(CtTypeReference<? extends Throwable> throwType)
CtExecutable
removeThrownType
in interface CtExecutable<R>
public String getSignature()
CtExecutable
getSignature
in interface CtExecutable<R>
public CtExecutableReference<R> getReference()
CtNamedElement
getReference
in interface CtExecutable<R>
getReference
in interface CtNamedElement
getReference
in class CtNamedElementImpl
public CtExecutable<R> clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtElement
clone
in interface CtExecutable<R>
clone
in interface CtNamedElement
clone
in class CtNamedElementImpl
Copyright © 2007–2019 Inria. All rights reserved.