public abstract class CallableDeclaration<T extends CallableDeclaration<?>> extends BodyDeclaration<T> implements NodeWithAccessModifiers<T>, NodeWithDeclaration, NodeWithSimpleName<T>, NodeWithParameters<T>, NodeWithThrownExceptions<T>, NodeWithTypeParameters<T>, NodeWithJavadoc<T>, NodeWithAbstractModifier<T>, NodeWithStaticModifier<T>, NodeWithFinalModifier<T>, NodeWithStrictfpModifier<T>
Modifier and Type | Class and Description |
---|---|
static class |
CallableDeclaration.Signature
A method or constructor signature.
|
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversal
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, LINE_SEPARATOR_KEY, NODE_BY_BEGIN_POSITION, PHANTOM_KEY, prettyPrinterNoCommentsConfiguration, PRINTER_KEY, SYMBOL_RESOLVER_KEY
Constructor and Description |
---|
CallableDeclaration(TokenRange tokenRange,
NodeList<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
ReceiverParameter receiverParameter)
This constructor is used by the parser and is considered private.
|
asAnnotationDeclaration, asAnnotationMemberDeclaration, asClassOrInterfaceDeclaration, asCompactConstructorDeclaration, asConstructorDeclaration, asEnumConstantDeclaration, asEnumDeclaration, asFieldDeclaration, asInitializerDeclaration, asMethodDeclaration, asRecordDeclaration, asTypeDeclaration, getAnnotations, ifAnnotationDeclaration, ifAnnotationMemberDeclaration, ifClassOrInterfaceDeclaration, ifCompactConstructorDeclaration, ifConstructorDeclaration, ifEnumConstantDeclaration, ifEnumDeclaration, ifFieldDeclaration, ifInitializerDeclaration, ifMethodDeclaration, ifRecordDeclaration, ifTypeDeclaration, isAnnotationDeclaration, isAnnotationMemberDeclaration, isClassOrInterfaceDeclaration, isCompactConstructorDeclaration, isConstructorDeclaration, isEnumConstantDeclaration, isEnumDeclaration, isFieldDeclaration, isInitializerDeclaration, isMethodDeclaration, isRecordDeclaration, isTypeDeclaration, setAnnotations, toAnnotationDeclaration, toAnnotationMemberDeclaration, toClassOrInterfaceDeclaration, toCompactConstructorDeclaration, toConstructorDeclaration, toEnumConstantDeclaration, toEnumDeclaration, toFieldDeclaration, toInitializerDeclaration, toMethodDeclaration, toRecordDeclaration, toTypeDeclaration
addOrphanComment, containsData, createDefaultPrinter, createDefaultPrinter, customInitialization, equals, findAll, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getDefaultPrinterConfiguration, getLineEndingStyle, getLineEndingStyleOrDefault, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getPrinter, getPrinter, getRange, getSymbolResolver, getTokenRange, hashCode, hasScope, isAncestorOf, isPhantom, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walk
finalize, getClass, notify, notifyAll, wait, wait, wait
isPublic, setPublic
isPrivate, setPrivate
isProtected, setProtected
addModifier, getAccessSpecifier, hasModifier, removeModifier, setModifier, setModifiers
getDeclarationAsString, getDeclarationAsString, getDeclarationAsString
getNameAsExpression, getNameAsString, setName
addAndGetParameter, addAndGetParameter, addAndGetParameter, addAndGetParameter, addParameter, addParameter, addParameter, addParameter, getParameter, getParameterByName, getParameterByType, getParameterByType, hasParametersOfType, hasParametersOfType, setParameter, tryAddImportToParentCompilationUnit
addThrownException, addThrownException, getThrownException, isThrown, isThrown, tryAddImportToParentCompilationUnit
addTypeParameter, addTypeParameter, getTypeParameter, isGeneric, setTypeParameter
getComment, getJavadoc, getJavadocComment, hasJavaDocComment, removeJavaDocComment, setComment, setJavadocComment, setJavadocComment, setJavadocComment, setJavadocComment
isAbstract, setAbstract
isStatic, setStatic
isFinal, setFinal
isStrictfp, setStrictfp
addAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnit
findAncestor, findAncestor, findAncestor, hasParentNode, isDescendantOf
containsWithin, containsWithinRange, getBegin, getEnd, hasRange
public CallableDeclaration(TokenRange tokenRange, NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType> thrownExceptions, ReceiverParameter receiverParameter)
public NodeList<Modifier> getModifiers()
getModifiers
in interface NodeWithModifiers<T extends CallableDeclaration<?>>
Modifier
public T setModifiers(NodeList<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<T extends CallableDeclaration<?>>
public SimpleName getName()
getName
in interface NodeWithSimpleName<T extends CallableDeclaration<?>>
public T setName(SimpleName name)
setName
in interface NodeWithSimpleName<T extends CallableDeclaration<?>>
public NodeList<Parameter> getParameters()
getParameters
in interface NodeWithParameters<T extends CallableDeclaration<?>>
public T setParameters(NodeList<Parameter> parameters)
setParameters
in interface NodeWithParameters<T extends CallableDeclaration<?>>
public NodeList<ReferenceType> getThrownExceptions()
getThrownExceptions
in interface NodeWithThrownExceptions<T extends CallableDeclaration<?>>
public T setThrownExceptions(NodeList<ReferenceType> thrownExceptions)
setThrownExceptions
in interface NodeWithThrownExceptions<T extends CallableDeclaration<?>>
public NodeList<TypeParameter> getTypeParameters()
getTypeParameters
in interface NodeWithTypeParameters<T extends CallableDeclaration<?>>
public T setTypeParameters(NodeList<TypeParameter> typeParameters)
setTypeParameters
in interface NodeWithTypeParameters<T extends CallableDeclaration<?>>
protected String appendThrowsIfRequested(boolean includingThrows)
public boolean remove(Node node)
remove
in class BodyDeclaration<T extends CallableDeclaration<?>>
public CallableDeclaration.Signature getSignature()
public CallableDeclaration<?> clone()
clone
in class BodyDeclaration<T extends CallableDeclaration<?>>
public CallableDeclarationMetaModel getMetaModel()
getMetaModel
in class BodyDeclaration<T extends CallableDeclaration<?>>
public boolean replace(Node node, Node replacementNode)
replace
in class BodyDeclaration<T extends CallableDeclaration<?>>
public boolean isCallableDeclaration()
isCallableDeclaration
in class BodyDeclaration<T extends CallableDeclaration<?>>
public CallableDeclaration asCallableDeclaration()
asCallableDeclaration
in class BodyDeclaration<T extends CallableDeclaration<?>>
public void ifCallableDeclaration(Consumer<CallableDeclaration> action)
ifCallableDeclaration
in class BodyDeclaration<T extends CallableDeclaration<?>>
public Optional<ReceiverParameter> getReceiverParameter()
public T setReceiverParameter(ReceiverParameter receiverParameter)
public CallableDeclaration removeReceiverParameter()
public Optional<CallableDeclaration> toCallableDeclaration()
toCallableDeclaration
in class BodyDeclaration<T extends CallableDeclaration<?>>
public boolean isVariableArityMethod()
public boolean isFixedArityMethod()
Copyright © 2007–2024. All rights reserved.