|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jst.ws.annotations.core.AnnotationsCore
public final class AnnotationsCore
Utility class for creating annotations and member value pairs.
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Method Summary | |
---|---|
static org.eclipse.jdt.core.dom.MemberValuePair |
createArrayMemberValuePair(org.eclipse.jdt.core.dom.AST ast,
java.lang.String name,
java.lang.Object[] values)
Creates a new MemberValuePair with an ArrayInitializer value. |
static org.eclipse.jdt.core.dom.ArrayInitializer |
createArrayValueLiteral(org.eclipse.jdt.core.dom.AST ast,
java.lang.Object[] values)
Creates a new ArrayInitializer . |
static org.eclipse.jdt.core.dom.BooleanLiteral |
createBooleanLiteral(org.eclipse.jdt.core.dom.AST ast,
boolean value)
Creates a new BooleanLiteral . |
static org.eclipse.jdt.core.dom.MemberValuePair |
createBooleanMemberValuePair(org.eclipse.jdt.core.dom.AST ast,
java.lang.String name,
java.lang.Boolean value)
Creates a new MemberValuePair with a BooleanLiteral value. |
static org.eclipse.jdt.core.dom.QualifiedName |
createEnumLiteral(org.eclipse.jdt.core.dom.AST ast,
java.lang.String className,
org.eclipse.jdt.core.IField enumConstant)
Creates a new QualifiedName to represent an enum literal value. |
static org.eclipse.jdt.core.dom.QualifiedName |
createEnumLiteral(org.eclipse.jdt.core.dom.AST ast,
java.lang.String className,
java.lang.Object value)
Creates a new QualifiedName to represent an enum literal value. |
static org.eclipse.jdt.core.dom.MemberValuePair |
createEnumMemberValuePair(org.eclipse.jdt.core.dom.AST ast,
java.lang.String className,
java.lang.String name,
java.lang.Object value)
Creates a new MemberValuePair with a Name value. |
static org.eclipse.jdt.core.dom.MarkerAnnotation |
createMarkerAnnotation(org.eclipse.jdt.core.dom.AST ast,
java.lang.String annotationName)
Creates a new MarkerAnnotation . |
static org.eclipse.jdt.core.dom.MemberValuePair |
createMemberValuePair(org.eclipse.jdt.core.dom.AST ast,
java.lang.String name,
org.eclipse.jdt.core.dom.Expression expression)
Creates a new MemberValuePair . |
static org.eclipse.jdt.core.dom.NormalAnnotation |
createNormalAnnotation(org.eclipse.jdt.core.dom.AST ast,
java.lang.String annotationName,
java.util.List<org.eclipse.jdt.core.dom.MemberValuePair> memberValuePairs)
Creates a new NormalAnnotation . |
static org.eclipse.jdt.core.dom.NumberLiteral |
createNumberLiteral(org.eclipse.jdt.core.dom.AST ast,
java.lang.String value)
Creates a new NumberLiteral . |
static org.eclipse.jdt.core.dom.MemberValuePair |
createNumberMemberValuePair(org.eclipse.jdt.core.dom.AST ast,
java.lang.String name,
java.lang.String value)
Creates a new MemberValuePair with a NumberLiteral value. |
static org.eclipse.jdt.core.dom.SingleMemberAnnotation |
createSingleMemberAnnotation(org.eclipse.jdt.core.dom.AST ast,
java.lang.String annotationName,
org.eclipse.jdt.core.dom.Expression value)
Creates a new SingleMemberAnnotation . |
static org.eclipse.jdt.core.dom.StringLiteral |
createStringLiteral(org.eclipse.jdt.core.dom.AST ast,
java.lang.String literalValue)
Creates a new StringLiteral . |
static org.eclipse.jdt.core.dom.MemberValuePair |
createStringMemberValuePair(org.eclipse.jdt.core.dom.AST ast,
java.lang.String name,
java.lang.String value)
Creates a new MemberValuePair with a StringLiteral value. |
static org.eclipse.jdt.core.dom.TypeLiteral |
createTypeLiteral(org.eclipse.jdt.core.dom.AST ast,
java.lang.Class<?> value)
Creates a new TypeLiteral . |
static org.eclipse.jdt.core.dom.TypeLiteral |
createTypeLiteral(org.eclipse.jdt.core.dom.AST ast,
java.lang.Object value)
Creates a new TypeLiteral . |
static org.eclipse.jdt.core.dom.TypeLiteral |
createTypeLiteral(org.eclipse.jdt.core.dom.AST ast,
java.lang.String value)
Creates a new TypeLiteral |
static org.eclipse.jdt.core.dom.MemberValuePair |
createTypeMemberValuePair(org.eclipse.jdt.core.dom.AST ast,
java.lang.String name,
java.lang.Object value)
Creates a new MemberValuePair with a TypeLiteral value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.eclipse.jdt.core.dom.NormalAnnotation createNormalAnnotation(org.eclipse.jdt.core.dom.AST ast, java.lang.String annotationName, java.util.List<org.eclipse.jdt.core.dom.MemberValuePair> memberValuePairs)
NormalAnnotation
.
ast
- the AST
that will be used to create the annotation.annotationName
- the name of the annotation.memberValuePairs
- a list of MemberValuePair
to add to the normal annotation.
public static org.eclipse.jdt.core.dom.SingleMemberAnnotation createSingleMemberAnnotation(org.eclipse.jdt.core.dom.AST ast, java.lang.String annotationName, org.eclipse.jdt.core.dom.Expression value)
SingleMemberAnnotation
.
ast
- the AST
that will be used to create the annotation.annotationName
- the name of the annotation.value
- the Expression
to set as the single member annotation value.
public static org.eclipse.jdt.core.dom.MarkerAnnotation createMarkerAnnotation(org.eclipse.jdt.core.dom.AST ast, java.lang.String annotationName)
MarkerAnnotation
.
ast
- the AST
that will be used to create the annotation.annotationName
- the name of the annotation.
public static org.eclipse.jdt.core.dom.MemberValuePair createMemberValuePair(org.eclipse.jdt.core.dom.AST ast, java.lang.String name, org.eclipse.jdt.core.dom.Expression expression)
MemberValuePair
.
ast
- the AST
that will be used to create the member value pair.name
- the MemberValuePair
"name".expression
- the Expression
"value" of the member value pair.
public static org.eclipse.jdt.core.dom.MemberValuePair createStringMemberValuePair(org.eclipse.jdt.core.dom.AST ast, java.lang.String name, java.lang.String value)
MemberValuePair
with a StringLiteral
value.
ast
- the AST
that will be used to create the member value pair.name
- the member value pair "name".value
- the String
"value".
public static org.eclipse.jdt.core.dom.MemberValuePair createBooleanMemberValuePair(org.eclipse.jdt.core.dom.AST ast, java.lang.String name, java.lang.Boolean value)
MemberValuePair
with a BooleanLiteral
value.
ast
- the AST
that will be used to create the member value pair.name
- the member value pair "name".value
- the Boolean
"value".
public static org.eclipse.jdt.core.dom.MemberValuePair createNumberMemberValuePair(org.eclipse.jdt.core.dom.AST ast, java.lang.String name, java.lang.String value)
MemberValuePair
with a NumberLiteral
value.
ast
- the AST
that will be used to create the member value pair.name
- the member value pair "name".value
- the String
"value" representing the number.
public static org.eclipse.jdt.core.dom.MemberValuePair createEnumMemberValuePair(org.eclipse.jdt.core.dom.AST ast, java.lang.String className, java.lang.String name, java.lang.Object value)
MemberValuePair
with a Name
value.
ast
- the AST
that will be used to create the member value pair.className
- the enclosing class name.name
- the member value pair "name".value
- an object representing the enum
value.
public static org.eclipse.jdt.core.dom.MemberValuePair createTypeMemberValuePair(org.eclipse.jdt.core.dom.AST ast, java.lang.String name, java.lang.Object value)
MemberValuePair
with a TypeLiteral
value.
ast
- the AST
that will be used to create the member value pair.name
- the member value pair "name".value
- an object representing the type value.
public static org.eclipse.jdt.core.dom.MemberValuePair createArrayMemberValuePair(org.eclipse.jdt.core.dom.AST ast, java.lang.String name, java.lang.Object[] values)
MemberValuePair
with an ArrayInitializer
value.
ast
- the AST
that will be used to create the member value pair.name
- the member value pair "name".values
- an array of Object
values. Supports String
, Boolean
, Class
values.
public static org.eclipse.jdt.core.dom.ArrayInitializer createArrayValueLiteral(org.eclipse.jdt.core.dom.AST ast, java.lang.Object[] values)
ArrayInitializer
.
ast
- the AST
that will be used to create the ArrayInitializer
.values
- an array of Object
values. Supports String
, Boolean
, Class
values.
public static org.eclipse.jdt.core.dom.QualifiedName createEnumLiteral(org.eclipse.jdt.core.dom.AST ast, java.lang.String className, java.lang.Object value)
QualifiedName
to represent an enum
literal value.
ast
- the AST
that will be used to create the qualified name.className
- the fully qualified name of the enclosing class.value
- an object representing the enum
value.
public static org.eclipse.jdt.core.dom.QualifiedName createEnumLiteral(org.eclipse.jdt.core.dom.AST ast, java.lang.String className, org.eclipse.jdt.core.IField enumConstant)
QualifiedName
to represent an enum
literal value.
ast
- the AST
that will be used to create the qualified name.className
- the fully qualified name of the enclosing class.enumConstant
- a IField
where isEnumConstant()
is true
.
org.eclipse.jdt.core.JavaModelException
public static org.eclipse.jdt.core.dom.TypeLiteral createTypeLiteral(org.eclipse.jdt.core.dom.AST ast, java.lang.Object value)
TypeLiteral
.
ast
- the AST
that will be used to create the TypeLiteral
.value
- a Class
or a String
from which to create the type literal.
Class
or String
.public static org.eclipse.jdt.core.dom.TypeLiteral createTypeLiteral(org.eclipse.jdt.core.dom.AST ast, java.lang.Class<?> value)
TypeLiteral
.
ast
- the AST
that will be used to create the type literal.value
- the class value.
public static org.eclipse.jdt.core.dom.TypeLiteral createTypeLiteral(org.eclipse.jdt.core.dom.AST ast, java.lang.String value)
TypeLiteral
ast
- the AST
that will be used to create the type literal.value
- the name of the class.
public static org.eclipse.jdt.core.dom.StringLiteral createStringLiteral(org.eclipse.jdt.core.dom.AST ast, java.lang.String literalValue)
StringLiteral
.
ast
- the AST
that will be used to create the string literal.literalValue
- the string value.
public static org.eclipse.jdt.core.dom.BooleanLiteral createBooleanLiteral(org.eclipse.jdt.core.dom.AST ast, boolean value)
BooleanLiteral
.
ast
- the AST
that will be used to create the boolean literal.value
- the boolean value.
public static org.eclipse.jdt.core.dom.NumberLiteral createNumberLiteral(org.eclipse.jdt.core.dom.AST ast, java.lang.String value)
NumberLiteral
.
ast
- the AST
that will be used to create the NumberLiteral
.value
- the number value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |