Package manifold.api.gen
Class AbstractSrcMethod<T extends AbstractSrcMethod<T>>
- java.lang.Object
-
- manifold.api.gen.SrcElement
-
- manifold.api.gen.SrcAnnotated<T>
-
- manifold.api.gen.SrcStatement<T>
-
- manifold.api.gen.AbstractSrcMethod<T>
-
- Direct Known Subclasses:
SrcConstructor,SrcGetProperty,SrcMethod,SrcSetProperty
public class AbstractSrcMethod<T extends AbstractSrcMethod<T>> extends SrcStatement<T>
-
-
Field Summary
-
Fields inherited from class manifold.api.gen.SrcAnnotated
NON_SEALED, SEALED
-
Fields inherited from class manifold.api.gen.SrcElement
INDENT
-
-
Constructor Summary
Constructors Constructor Description AbstractSrcMethod(AbstractSrcClass srcClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddThrowType(SrcType type)voidaddTypeVar(SrcType typeVar)Tbody(String rawText)Tbody(SrcStatementBlock body)StringgetDefaultValue()SrcTypegetReturnType()List<SrcType>getThrowTypes()List<SrcType>getTypeVariables()booleanisConstructor()booleanisPrimaryConstructor()StringBuilderrender(StringBuilder sb, int indent)Treturns(Class returns)Treturns(String returns)Treturns(SrcType returns)voidsetConstructor(boolean isConstructor)voidsetDefaultValue(String defaultValue)voidsetPrimaryConstructor(boolean primary)Stringsignature()TthrowsList(Class<? extends Throwable>... list)TthrowsList(SrcType... list)-
Methods inherited from class manifold.api.gen.SrcAnnotated
addAnnotation, addAnnotation, addAnnotation, addParam, addParam, addParam, addParam, clearUserData, computeOrGetUserData, forwardParameters, getAnnotation, getAnnotations, getModifiers, getParameters, getSimpleName, getUserData, hasAnnotation, hasAnnotation, insertParam, modifiers, modifiers, modifiersFrom, name, removeUserData, renderAnnotations, renderAnnotations, renderArgumenets, renderModifiers, renderModifiers, renderParameters, renderParameters, withUserData
-
Methods inherited from class manifold.api.gen.SrcElement
getOwner, indent, makeCompileTimeConstantValue, setOwner, toString
-
-
-
-
Constructor Detail
-
AbstractSrcMethod
public AbstractSrcMethod(AbstractSrcClass srcClass)
-
-
Method Detail
-
isConstructor
public boolean isConstructor()
-
setConstructor
public void setConstructor(boolean isConstructor)
-
isPrimaryConstructor
public boolean isPrimaryConstructor()
-
setPrimaryConstructor
public void setPrimaryConstructor(boolean primary)
-
addTypeVar
public void addTypeVar(SrcType typeVar)
-
throwsList
@SafeVarargs public final T throwsList(Class<? extends Throwable>... list)
-
addThrowType
public void addThrowType(SrcType type)
-
body
public T body(SrcStatementBlock body)
-
getDefaultValue
public String getDefaultValue()
-
setDefaultValue
public void setDefaultValue(String defaultValue)
-
getReturnType
public SrcType getReturnType()
-
signature
public String signature()
-
render
public StringBuilder render(StringBuilder sb, int indent)
- Specified by:
renderin classSrcElement
-
-