public class Method extends ModifierSupport implements Renderable, Commentable, Annotatable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT |
ABSTRACT, FINAL, modifiers, PRIVATE, PROTECTED, PUBLIC, STATIC, SYNCHRONIZEDAT, CB, CC, CLP, COMA, CP, DOT, DQ, EQ, EXTENDS, GT, IMPLEMENTS, JAVA_LANG, JAVA_LANG_ENUM, JAVA_LANG_OBJECT, JAVA_LANG_STRING, LT, NEWLINE, OB, OC, OP, Q, SEMICOLN, SPACE, STAR, THROWS, VARARGALSO_IMPORT, DEFAULT_VALUE, INIT, INIT_FUNCTION, LAZY_INIT| Constructor and Description |
|---|
Method(java.util.List<java.lang.String> comments,
java.util.List<AnnotationRef> annotations,
java.util.List<TypeParamDef> parameters,
java.lang.String name,
TypeRef returnType,
java.util.List<Property> arguments,
boolean varArgPreferred,
java.util.List<ClassRef> exceptions,
boolean defaultMethod,
Block block,
int modifiers,
java.util.Map<AttributeKey,java.lang.Object> attributes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<AnnotationRef> |
getAnnotations() |
java.util.List<Property> |
getArguments() |
Block |
getBlock() |
java.util.List<java.lang.String> |
getComments()
Get the list of comments.
|
java.util.List<ClassRef> |
getExceptions() |
java.lang.String |
getName() |
java.util.List<TypeParamDef> |
getParameters() |
java.util.Set<ClassRef> |
getReferences() |
TypeRef |
getReturnType() |
java.lang.String |
getSignature() |
int |
hashCode() |
boolean |
isDefaultMethod() |
boolean |
isVarArgPreferred() |
java.lang.String |
render(TypeDef enclosingType)
Render the type into a
String for the purpose of code generation. |
void |
renderDefinition(java.lang.StringBuilder sb,
TypeDef enclosingType) |
java.lang.String |
renderDefinition(TypeDef enclosingType) |
java.lang.String |
toString() |
Method |
withErasure() |
getModifiers, isAbstract, isFinal, isPrivate, isProtected, isPublic, isStatic, isSynchronized, isTransient, renderModifiers, renderModifiersgetAttribute, getAttributes, hasAttributeclone, finalize, getClass, notify, notifyAll, wait, wait, waitrenderrenderCommentsrenderAnnotationspublic static final java.lang.String DEFAULT
public Method(java.util.List<java.lang.String> comments,
java.util.List<AnnotationRef> annotations,
java.util.List<TypeParamDef> parameters,
java.lang.String name,
TypeRef returnType,
java.util.List<Property> arguments,
boolean varArgPreferred,
java.util.List<ClassRef> exceptions,
boolean defaultMethod,
Block block,
int modifiers,
java.util.Map<AttributeKey,java.lang.Object> attributes)
public java.util.List<java.lang.String> getComments()
CommentablegetComments in interface CommentableList of comments.public java.util.List<AnnotationRef> getAnnotations()
getAnnotations in interface Annotatablepublic boolean isVarArgPreferred()
public java.util.List<TypeParamDef> getParameters()
public java.lang.String getName()
public TypeRef getReturnType()
public java.util.List<Property> getArguments()
public java.util.List<ClassRef> getExceptions()
public boolean isDefaultMethod()
public Block getBlock()
public Method withErasure()
public java.util.Set<ClassRef> getReferences()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getSignature()
public java.lang.String renderDefinition(TypeDef enclosingType)
public void renderDefinition(java.lang.StringBuilder sb,
TypeDef enclosingType)
public java.lang.String render(TypeDef enclosingType)
RenderableString for the purpose of code generation.
This is slightly different from the `toString()` method as `toString()` is mostly needed for logging / debugging.
In contrast with its no-arg equivallent this method is idempotent.render in interface RenderableenclosingType - The type that encoses the current Renderable.String representation of the object as it's meant to appear in the generated code.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2022. All Rights Reserved.