Class Parameter.Builder
java.lang.Object
be.imgn.gaia.processing.source.Parameter.Builder
- Enclosing class:
Parameter
-
Method Summary
Modifier and TypeMethodDescriptionaddAnnotation(Annotation annotation) Adds a declaration annotation.addAnnotation(ClassName annotation) Adds a declaration annotation without members.addAnnotation(Class<? extends Annotation> annotation) Adds a declaration annotation without members.addAnnotations(Iterable<Annotation> more) Adds declaration annotations.addJavadoc(CodeBlock text) Adds Javadoc text, written as an@paramtag in the Javadoc of the method or record.addJavadoc(String format, @Nullable Object... args) Adds Javadoc text, written as an@paramtag in the Javadoc of the method or record.addModifiers(Iterable<Modifier> more) Adds modifiers.addModifiers(Modifier... more) Adds modifiers.build()Builds the parameter.
-
Method Details
-
addModifiers
Adds modifiers.- Parameters:
more- the modifiers: onlyfinalis allowed, and none on a receiver parameter- Returns:
- this builder
- Throws:
IllegalArgumentException- if a modifier is notfinalor is repeated, or this is a receiver parameter
-
addModifiers
Adds modifiers.- Parameters:
more- the modifiers: onlyfinalis allowed, and none on a receiver parameter- Returns:
- this builder
- Throws:
IllegalArgumentException- if a modifier is notfinalor is repeated, or this is a receiver parameter
-
addAnnotation
Adds a declaration annotation. A type annotation, such as@Nullable, goes on the type instead.- Parameters:
annotation- the annotation- Returns:
- this builder
-
addAnnotation
Adds a declaration annotation without members.- Parameters:
annotation- the annotation type- Returns:
- this builder
- Throws:
IllegalArgumentException- if the class is not an annotation type
-
addAnnotation
Adds a declaration annotation without members.- Parameters:
annotation- the annotation type- Returns:
- this builder
-
addAnnotations
Adds declaration annotations.- Parameters:
more- the annotations- Returns:
- this builder
-
addJavadoc
Adds Javadoc text, written as an@paramtag in the Javadoc of the method or record. End each line with\n.- Parameters:
format- the text, with placeholdersargs- the arguments of the placeholders- Returns:
- this builder
- Throws:
IllegalArgumentException- if the format and the arguments do not match
-
addJavadoc
Adds Javadoc text, written as an@paramtag in the Javadoc of the method or record. End each line with\n.- Parameters:
text- the text- Returns:
- this builder
-
build
Builds the parameter.- Returns:
- the parameter
- Throws:
IllegalStateException- if the Javadoc is not balanced
-