Modifier and Type | Field and Description |
---|---|
static ParseStart<AnnotationExpr> |
ParseStart.ANNOTATION |
Modifier and Type | Method and Description |
---|---|
static AnnotationExpr |
JavaParser.parseAnnotation(String annotation)
Parses the Java annotation contained in a
String and returns a
AnnotationExpr that represents it. |
Modifier and Type | Method and Description |
---|---|
NodeList<AnnotationExpr> |
PackageDeclaration.getAnnotations()
Retrieves the list of annotations declared before the package
declaration.
|
NodeList<AnnotationExpr> |
ArrayCreationLevel.getAnnotations() |
Modifier and Type | Method and Description |
---|---|
PackageDeclaration |
PackageDeclaration.setAnnotations(NodeList<AnnotationExpr> annotations) |
ArrayCreationLevel |
ArrayCreationLevel.setAnnotations(NodeList<AnnotationExpr> annotations) |
Constructor and Description |
---|
ArrayCreationLevel(Expression dimension,
NodeList<AnnotationExpr> annotations) |
ArrayCreationLevel(TokenRange tokenRange,
Expression dimension,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
PackageDeclaration(NodeList<AnnotationExpr> annotations,
Name name) |
PackageDeclaration(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations,
Name name)
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method and Description |
---|---|
NodeList<AnnotationExpr> |
Parameter.getAnnotations() |
NodeList<AnnotationExpr> |
BodyDeclaration.getAnnotations() |
NodeList<AnnotationExpr> |
ReceiverParameter.getAnnotations() |
NodeList<AnnotationExpr> |
Parameter.getVarArgsAnnotations() |
Modifier and Type | Method and Description |
---|---|
Parameter |
Parameter.setAnnotations(NodeList<AnnotationExpr> annotations) |
T |
BodyDeclaration.setAnnotations(NodeList<AnnotationExpr> annotations) |
ReceiverParameter |
ReceiverParameter.setAnnotations(NodeList<AnnotationExpr> annotations) |
Parameter |
Parameter.setVarArgsAnnotations(NodeList<AnnotationExpr> varArgsAnnotations) |
Constructor and Description |
---|
AnnotationDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<BodyDeclaration<?>> members) |
AnnotationDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<BodyDeclaration<?>> members)
This constructor is used by the parser and is considered private.
|
AnnotationMemberDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
SimpleName name,
Expression defaultValue) |
AnnotationMemberDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
SimpleName name,
Expression defaultValue)
This constructor is used by the parser and is considered private.
|
BodyDeclaration(NodeList<AnnotationExpr> annotations) |
BodyDeclaration(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
CallableDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
ReceiverParameter receiverParameter)
This constructor is used by the parser and is considered private.
|
ClassOrInterfaceDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
boolean isInterface,
SimpleName name,
NodeList<TypeParameter> typeParameters,
NodeList<ClassOrInterfaceType> extendedTypes,
NodeList<ClassOrInterfaceType> implementedTypes,
NodeList<BodyDeclaration<?>> members) |
ClassOrInterfaceDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
boolean isInterface,
SimpleName name,
NodeList<TypeParameter> typeParameters,
NodeList<ClassOrInterfaceType> extendedTypes,
NodeList<ClassOrInterfaceType> implementedTypes,
NodeList<BodyDeclaration<?>> members)
This constructor is used by the parser and is considered private.
|
ConstructorDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body) |
ConstructorDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body,
ReceiverParameter receiverParameter) |
ConstructorDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body,
ReceiverParameter receiverParameter)
This constructor is used by the parser and is considered private.
|
EnumConstantDeclaration(NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> classBody) |
EnumConstantDeclaration(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<Expression> arguments,
NodeList<BodyDeclaration<?>> classBody)
This constructor is used by the parser and is considered private.
|
EnumDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<ClassOrInterfaceType> implementedTypes,
NodeList<EnumConstantDeclaration> entries,
NodeList<BodyDeclaration<?>> members) |
EnumDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<ClassOrInterfaceType> implementedTypes,
NodeList<EnumConstantDeclaration> entries,
NodeList<BodyDeclaration<?>> members)
This constructor is used by the parser and is considered private.
|
FieldDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<VariableDeclarator> variables) |
FieldDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<VariableDeclarator> variables)
This constructor is used by the parser and is considered private.
|
MethodDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
Type type,
SimpleName name,
boolean isDefault,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body)
Deprecated.
this constructor allows you to set "isDefault", but this is no longer a field of this node, but simply one of the modifiers. Use setDefault(boolean) or add DEFAULT to the modifiers set.
|
MethodDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
Type type,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body) |
MethodDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
Type type,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body,
ReceiverParameter receiverParameter) |
MethodDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<TypeParameter> typeParameters,
Type type,
SimpleName name,
NodeList<Parameter> parameters,
NodeList<ReferenceType> thrownExceptions,
BlockStmt body,
ReceiverParameter receiverParameter)
This constructor is used by the parser and is considered private.
|
Parameter(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
NodeList<AnnotationExpr> varArgsAnnotations,
SimpleName name) |
Parameter(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
NodeList<AnnotationExpr> varArgsAnnotations,
SimpleName name) |
Parameter(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
NodeList<AnnotationExpr> varArgsAnnotations,
SimpleName name)
This constructor is used by the parser and is considered private.
|
Parameter(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
NodeList<AnnotationExpr> varArgsAnnotations,
SimpleName name)
This constructor is used by the parser and is considered private.
|
ReceiverParameter(NodeList<AnnotationExpr> annotations,
Type type,
Name name) |
ReceiverParameter(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations,
Type type,
Name name)
This constructor is used by the parser and is considered private.
|
TypeDeclaration(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<BodyDeclaration<?>> members) |
TypeDeclaration(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
SimpleName name,
NodeList<BodyDeclaration<?>> members)
This constructor is used by the parser and is considered private.
|
Modifier and Type | Class and Description |
---|---|
class |
MarkerAnnotationExpr
An annotation that uses only the annotation type name.
|
class |
NormalAnnotationExpr
An annotation that has zero or more key-value pairs.
@Mapping(a=5, d=10) |
class |
SingleMemberAnnotationExpr
An annotation that has a single value.
|
Modifier and Type | Method and Description |
---|---|
AnnotationExpr |
Expression.asAnnotationExpr() |
AnnotationExpr |
AnnotationExpr.asAnnotationExpr() |
AnnotationExpr |
AnnotationExpr.clone() |
AnnotationExpr |
AnnotationExpr.setName(Name name) |
Modifier and Type | Method and Description |
---|---|
NodeList<AnnotationExpr> |
VariableDeclarationExpr.getAnnotations() |
NodeList<AnnotationExpr> |
Name.getAnnotations() |
Optional<AnnotationExpr> |
Expression.toAnnotationExpr() |
Optional<AnnotationExpr> |
AnnotationExpr.toAnnotationExpr() |
Modifier and Type | Method and Description |
---|---|
void |
Expression.ifAnnotationExpr(Consumer<AnnotationExpr> action) |
void |
AnnotationExpr.ifAnnotationExpr(Consumer<AnnotationExpr> action) |
VariableDeclarationExpr |
VariableDeclarationExpr.setAnnotations(NodeList<AnnotationExpr> annotations) |
Name |
Name.setAnnotations(NodeList<AnnotationExpr> annotations) |
Constructor and Description |
---|
Name(Name qualifier,
String identifier,
NodeList<AnnotationExpr> annotations) |
Name(TokenRange tokenRange,
Name qualifier,
String identifier,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
VariableDeclarationExpr(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<VariableDeclarator> variables) |
VariableDeclarationExpr(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<VariableDeclarator> variables)
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method and Description |
---|---|
NodeList<AnnotationExpr> |
ModuleDeclaration.getAnnotations() |
Modifier and Type | Method and Description |
---|---|
ModuleDeclaration |
ModuleDeclaration.setAnnotations(NodeList<AnnotationExpr> annotations) |
Constructor and Description |
---|
ModuleDeclaration(NodeList<AnnotationExpr> annotations,
Name name,
boolean isOpen,
NodeList<ModuleStmt> moduleStmts) |
ModuleDeclaration(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations,
Name name,
boolean isOpen,
NodeList<ModuleStmt> moduleStmts)
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method and Description |
---|---|
default AnnotationExpr |
NodeWithAnnotations.getAnnotation(int i) |
Modifier and Type | Method and Description |
---|---|
default Optional<AnnotationExpr> |
NodeWithAnnotations.getAnnotationByClass(Class<? extends Annotation> annotationClass)
Try to find an annotation by its class
|
default Optional<AnnotationExpr> |
NodeWithAnnotations.getAnnotationByName(String annotationName)
Try to find an annotation by its name
|
NodeList<AnnotationExpr> |
NodeWithAnnotations.getAnnotations() |
Modifier and Type | Method and Description |
---|---|
default N |
NodeWithAnnotations.addAnnotation(AnnotationExpr element) |
default N |
NodeWithAnnotations.setAnnotation(int i,
AnnotationExpr element) |
Modifier and Type | Method and Description |
---|---|
N |
NodeWithAnnotations.setAnnotations(NodeList<AnnotationExpr> annotations) |
Constructor and Description |
---|
CatchClause(EnumSet<Modifier> exceptModifier,
NodeList<AnnotationExpr> exceptAnnotations,
ClassOrInterfaceType exceptType,
SimpleName exceptName,
BlockStmt body) |
Modifier and Type | Method and Description |
---|---|
AnnotationExpr |
Type.getAnnotation(int i) |
Modifier and Type | Method and Description |
---|---|
NodeList<AnnotationExpr> |
ArrayType.ArrayBracketPair.getAnnotations() |
NodeList<AnnotationExpr> |
Type.getAnnotations() |
Constructor and Description |
---|
ArrayType(Type type,
AnnotationExpr... annotations) |
Constructor and Description |
---|
ArrayBracketPair(TokenRange tokenRange,
ArrayType.Origin origin,
NodeList<AnnotationExpr> annotations) |
ArrayType(TokenRange tokenRange,
Type componentType,
ArrayType.Origin origin,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
ArrayType(Type componentType,
ArrayType.Origin origin,
NodeList<AnnotationExpr> annotations) |
ClassOrInterfaceType(ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type> typeArguments,
NodeList<AnnotationExpr> annotations) |
ClassOrInterfaceType(TokenRange tokenRange,
ClassOrInterfaceType scope,
SimpleName name,
NodeList<Type> typeArguments,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
PrimitiveType(PrimitiveType.Primitive type,
NodeList<AnnotationExpr> annotations) |
PrimitiveType(TokenRange tokenRange,
PrimitiveType.Primitive type,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
ReferenceType(NodeList<AnnotationExpr> annotations) |
ReferenceType(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
Type(NodeList<AnnotationExpr> annotations) |
Type(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
TypeParameter(SimpleName name,
NodeList<ClassOrInterfaceType> typeBound,
NodeList<AnnotationExpr> annotations) |
TypeParameter(TokenRange tokenRange,
SimpleName name,
NodeList<ClassOrInterfaceType> typeBound,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
WildcardType(ReferenceType extendedType,
ReferenceType superType,
NodeList<AnnotationExpr> annotations) |
WildcardType(TokenRange tokenRange,
ReferenceType extendedType,
ReferenceType superType,
NodeList<AnnotationExpr> annotations)
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method and Description |
---|---|
static AnnotationExpr |
PositionUtils.getLastAnnotation(Node node) |
Copyright © 2007–2017. All rights reserved.