Module java4ever.binding
Class MethodSpec.Builder
java.lang.Object
tech.deplant.java4ever.binding.generator.javapoet.MethodSpec.Builder
- Enclosing class:
MethodSpec
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal List<AnnotationSpec>
final List<ParameterSpec>
final List<TypeVariableName>
-
Method Summary
Modifier and TypeMethodDescriptionaddAnnotation
(Class<?> annotation) addAnnotation
(AnnotationSpec annotationSpec) addAnnotation
(ClassName annotation) addAnnotations
(Iterable<AnnotationSpec> annotationSpecs) addComment
(String format, Object... args) addException
(Type exception) addException
(TypeName exception) addExceptions
(Iterable<? extends TypeName> exceptions) addJavadoc
(String format, Object... args) addJavadoc
(CodeBlock block) addModifiers
(Iterable<Modifier> modifiers) addModifiers
(Modifier... modifiers) addNamedCode
(String format, Map<String, ?> args) addParameter
(Type type, String name, Modifier... modifiers) addParameter
(ParameterSpec parameterSpec) addParameter
(TypeName type, String name, Modifier... modifiers) addParameters
(Iterable<ParameterSpec> parameterSpecs) addStatement
(String format, Object... args) addStatement
(CodeBlock codeBlock) addTypeVariable
(TypeVariableName typeVariable) addTypeVariables
(Iterable<TypeVariableName> typeVariables) beginControlFlow
(String controlFlow, Object... args) beginControlFlow
(CodeBlock codeBlock) build()
defaultValue
(String format, Object... args) defaultValue
(CodeBlock codeBlock) endControlFlow
(String controlFlow, Object... args) endControlFlow
(CodeBlock codeBlock) nextControlFlow
(String controlFlow, Object... args) nextControlFlow
(CodeBlock codeBlock) varargs()
varargs
(boolean varargs)
-
Field Details
-
typeVariables
-
annotations
-
modifiers
-
parameters
-
-
Method Details
-
setName
-
addJavadoc
-
addJavadoc
-
addAnnotations
-
addAnnotation
-
addAnnotation
-
addAnnotation
-
addModifiers
-
addModifiers
-
addTypeVariables
-
addTypeVariable
-
returns
-
returns
-
addParameters
-
addParameter
-
addParameter
-
addParameter
-
varargs
-
varargs
-
addExceptions
-
addException
-
addException
-
addCode
-
addNamedCode
-
addCode
-
addComment
-
defaultValue
-
defaultValue
-
beginControlFlow
- Parameters:
controlFlow
- the control flow construct and its code, such as "if (foo == 5)". Shouldn't contain braces or newline characters.
-
beginControlFlow
- Parameters:
codeBlock
- the control flow construct and its code, such as "if (foo == 5)". Shouldn't contain braces or newline characters.
-
nextControlFlow
- Parameters:
controlFlow
- the control flow construct and its code, such as "else if (foo == 10)". Shouldn't contain braces or newline characters.
-
nextControlFlow
- Parameters:
codeBlock
- the control flow construct and its code, such as "else if (foo == 10)". Shouldn't contain braces or newline characters.
-
endControlFlow
-
endControlFlow
- Parameters:
controlFlow
- the optional control flow construct and its code, such as "while(foo == 20)". Only used for "do/while" control flows.
-
endControlFlow
- Parameters:
codeBlock
- the optional control flow construct and its code, such as "while(foo == 20)". Only used for "do/while" control flows.
-
addStatement
-
addStatement
-
build
-