JCatch |
JTry._catch(int mods,
JType type,
java.lang.String var) |
Add a catch block.
|
JClassDef |
JClassDef._extends(JType type) |
Add an extends type to this type.
|
JTypeParamDef |
JTypeParamDef._extends(JType type) |
Add an extends bound to this parameter.
|
JClassDef |
JClassDef._implements(JType... type) |
Add one or more implements type(s) to this type.
|
JSourceFile |
JSourceFile._import(JType type) |
Add a type import to this source file.
|
JExpr |
JExpr._instanceof(JType type) |
Get a type-testing expression using the instanceof operator.
|
JCall |
JBlock._new(JType type) |
Insert an object construction statement at this point.
|
JCall |
JExpr._new(JType type) |
Get an expression to construct a new inner class instance of this instance expression.
|
JAnonymousClassDef |
JBlock._newAnon(JType type) |
Insert an object construction statement for an anonymous class at this point.
|
JAnonymousClassDef |
JExpr._newAnon(JType type) |
Construct a new anonymous subclass of the given type, which must be an inner class of the type of this
expression.
|
JTypeParamDef |
JTypeParamDef._super(JType type) |
Add a super bound to this parameter.
|
JHtmlComment |
JDocComment._throws(JType exceptionType) |
Add a @throws tag.
|
JComment |
JMethodDef._throws(JType type) |
Get a @throws doc comment block.
|
JAnnotation |
JAnnotatable.annotate(JType type) |
Add an annotation.
|
JAnnotationArray |
JAnnotation.annotationArrayValue(java.lang.String name,
JType type) |
Set the named property of this annotation to an array of nested annotations of the given type.
|
JAnnotationArray |
JAnnotation.annotationArrayValue(JType type) |
Set the "value" property of this annotation to an array of nested annotations of the given type.
|
JAnnotation |
JAnnotation.annotationValue(java.lang.String name,
JType type) |
Set the named property of this annotation to a nested annotation of the given type.
|
JAnnotation |
JAnnotation.annotationValue(JType type) |
Set the "value" property of this annotation to a nested annotation of the given type.
|
JCall |
JBlock.callStatic(JType type,
java.lang.String name) |
Insert a type-qualified static method invocation at this point.
|
static JCall |
JExprs.callStatic(JType type,
java.lang.String name) |
Generate a method call expression to a method on the given static type.
|
JExpr |
JExpr.cast(JType type) |
Get an expression which is a cast of this expression to the given type.
|
JVarDeclaration |
JClassDefSection.field(int mods,
JType type,
java.lang.String name) |
Add a field to this type.
|
JVarDeclaration |
JClassDefSection.field(int mods,
JType type,
java.lang.String name,
JExpr init) |
Add a field to this type.
|
JBlock |
JBlock.forEach(int mods,
JType type,
java.lang.String name,
JExpr iterable) |
Insert a "for-each" style for loop at this point.
|
JTry |
JTry.ignore(JType type) |
Add a catch for an ignored exception.
|
JSourceFile |
JSourceFile.importStatic(JType type,
java.lang.String member) |
Add a static member import to this source file.
|
JVarDeclaration |
JFor.init(int mods,
JType type,
java.lang.String name,
JExpr value) |
Add a loop initializer.
|
JComment |
JComment.linkConstructor(boolean plain,
JType targetType,
JType... targetConstructorArgumentTypes) |
Add an inline @link to a constructor.
|
JComment |
JComment.linkField(boolean plain,
JType targetType,
java.lang.String targetField) |
Add an inline @link to a field of a type.
|
JComment |
JComment.linkMethod(boolean plain,
JType targetType,
java.lang.String targetMethod,
JType... targetMethodArgumentTypes) |
Add an inline @link to a method.
|
JComment |
JComment.linkType(boolean plain,
JType targetType) |
Add an inline @link to a type.
|
JMethodDef |
JClassDefSection.method(int mods,
JType returnType,
java.lang.String name) |
Add a method to this type.
|
JCatch |
JCatch.or(JType orType) |
Add another type option to this catch branch.
|
JLambda |
JLambda.param(JType type,
java.lang.String name) |
Add a declared-type parameter to this lambda.
|
JParamDeclaration |
JMethodDef.param(int mods,
JType type,
java.lang.String name) |
Add a parameter to this method.
|
JParamDeclaration |
JMethodDef.param(JType type,
java.lang.String name) |
Add a parameter to this method.
|
JExpr |
JBlock.tempVar(JType type,
JExpr value) |
Insert a local variable declaration at this point with a generated name.
|
JCall |
JCall.typeArg(JType type) |
Add a type argument to this call.
|
JType |
JType.typeArg(JType... args) |
This type, with the given generic type arguments.
|
JComment |
JComment.typeName(JType type) |
Add a type name to the end of this comment.
|
JDocComment |
JDocComment.typeName(JType type) |
Add a type name to the end of this comment.
|
JHtmlComment |
JHtmlComment.typeName(JType type) |
Add a type name to the end of this comment.
|
JDocComment |
JDocComment.value(JType type,
java.lang.String fieldName) |
Add a @value inline tag.
|
JHtmlComment |
JHtmlComment.value(JType type,
java.lang.String fieldName) |
Add a @value inline tag.
|
JVarDeclaration |
JBlock.var(int mods,
JType type,
java.lang.String name) |
Insert a local variable declaration at this point.
|
JVarDeclaration |
JBlock.var(int mods,
JType type,
java.lang.String name,
JExpr value) |
Insert a local variable declaration at this point.
|
JParamDeclaration |
JMethodDef.varargParam(int mods,
JType type,
java.lang.String name) |
Add a vararg parameter to this method.
|
JParamDeclaration |
JMethodDef.varargParam(JType type,
java.lang.String name) |
Add a vararg parameter to this method.
|
JVarDeclaration |
JTry.with(int mods,
JType type,
java.lang.String var,
JExpr init) |
Add a resource for try -with-resources constructs.
|