| Modifier and Type | Class and Description |
|---|---|
| public static class | CallableDeclaration.
A method or constructor signature. |
| Modifier and Type | Field and Description |
|---|---|
| private NodeList | |
| private SimpleName | |
| private NodeList | |
| private ReceiverParameter | |
| private NodeList | |
| private NodeList |
| Access | Constructor and Description |
|---|---|
| pack-priv | CallableDeclaration(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType> thrownExceptions, ReceiverParameter receiverParameter)
|
| public | 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. |
| modifiers | back to summary |
|---|---|
| private NodeList<Modifier> modifiers | |
| name | back to summary |
|---|---|
| private SimpleName name | |
| parameters | back to summary |
|---|---|
| private NodeList<Parameter> parameters | |
| receiverParameter | back to summary |
|---|---|
| private ReceiverParameter receiverParameter
| |
| thrownExceptions | back to summary |
|---|---|
| private NodeList<ReferenceType> thrownExceptions | |
| typeParameters | back to summary |
|---|---|
| private NodeList<TypeParameter> typeParameters | |
| CallableDeclaration | back to summary |
|---|---|
pack-priv CallableDeclaration(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<TypeParameter> typeParameters, SimpleName name, NodeList<Parameter> parameters, NodeList<ReferenceType> thrownExceptions, ReceiverParameter receiverParameter)
| |
| CallableDeclaration | back to summary |
|---|---|
| public 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.
| |
| appendThrowsIfRequested | back to summary |
|---|---|
| protected String appendThrowsIfRequested(boolean includingThrows) | |
| asCallableDeclaration | back to summary |
|---|---|
| public CallableDeclaration Overrides com.
| |
| clone | back to summary |
|---|---|
| public CallableDeclaration Overrides com. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| getMetaModel | back to summary |
|---|---|
| public CallableDeclarationMetaModel getMetaModel() Overrides com.
| |
| getModifiers | back to summary |
|---|---|
| public NodeList Implements com. Return the modifiers of this member declaration.
| |
| getName | back to summary |
|---|---|
| public SimpleName getName() Implements com.
| |
| getParameters | back to summary |
|---|---|
| public NodeList Implements com.
| |
| getReceiverParameter | back to summary |
|---|---|
public Optional
| |
| getSignature | back to summary |
|---|---|
| public CallableDeclaration. | |
| getThrownExceptions | back to summary |
|---|---|
| public NodeList Implements com.
| |
| getTypeParameters | back to summary |
|---|---|
| public NodeList Implements com.
| |
| getTypeWithVarargsAsArray | back to summary |
|---|---|
| private Type getTypeWithVarargsAsArray(Parameter p) | |
| ifCallableDeclaration | back to summary |
|---|---|
| public void ifCallableDeclaration(Consumer<CallableDeclaration<T extends CallableDeclaration<?>>> action) Overrides com.
| |
| isCallableDeclaration | back to summary |
|---|---|
| public boolean isCallableDeclaration() Overrides com.
| |
| remove | back to summary |
|---|---|
| public boolean remove(Node node) Overrides com.
| |
| removeReceiverParameter | back to summary |
|---|---|
public CallableDeclaration
| |
| replace | back to summary |
|---|---|
| public boolean replace(Node node, Node replacementNode) Overrides com.
| |
| setModifiers | back to summary |
|---|---|
| public T setModifiers(final NodeList<Modifier> modifiers) Implements com.
| |
| setName | back to summary |
|---|---|
| public T setName(final SimpleName name) Implements com.
| |
| setParameters | back to summary |
|---|---|
| public T setParameters(final NodeList<Parameter> parameters) Implements com.
| |
| setReceiverParameter | back to summary |
|---|---|
public T setReceiverParameter(final ReceiverParameter receiverParameter)
| |
| setThrownExceptions | back to summary |
|---|---|
| public T setThrownExceptions(final NodeList<ReferenceType> thrownExceptions) Implements com.
| |
| setTypeParameters | back to summary |
|---|---|
| public T setTypeParameters(final NodeList<TypeParameter> typeParameters) Implements com.
| |
| stripAnnotations | back to summary |
|---|---|
| private Type stripAnnotations(Type type) | |
| stripGenerics | back to summary |
|---|---|
| private Type stripGenerics(Type type) | |
| toCallableDeclaration | back to summary |
|---|---|
| public Optional Overrides com.
| |
Note that since JavaParser has no real knowledge of types - only the text found in the source file - using this will fail in some cases. (java.util.String != String for example, and generics are not taken into account.)
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public String | |
| public List | |
| public int | |
| public String |
| name | back to summary |
|---|---|
| private final String name | |
| parameterTypes | back to summary |
|---|---|
| private final List<Type> parameterTypes | |
| Signature | back to summary |
|---|---|
| private Signature(String name, List<Type> parameterTypes) | |
| asString | back to summary |
|---|---|
| public String asString() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getParameterTypes | back to summary |
|---|---|
| public List | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |