|
Eclipse JDT Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IMemberValuePair
Represents a member-value pair of an annotation.
The value is represented by an Object. To get the exact
type of this object, use its value kind. If this value is an array,
getValue() returns an instance of Object[] and the value kind returns
the kind of the elements in this array.
This interface is not intended to be implemented or extended by clients.
| Field Summary | |
|---|---|
static int |
K_ANNOTATION
Constant indicating that the value kind is an annotation represented by an instance of IAnnotation. |
static int |
K_BOOLEAN
Constant indicating that the value kind is a boolean represented by
an instance of Boolean. |
static int |
K_BYTE
Constant indicating that the value kind is a byte represented by
an instance of Byte. |
static int |
K_CHAR
Constant indicating that the value kind is a char represented by
an instance of Character. |
static int |
K_CLASS
Constant indicating that the value kind is a Class represented by
the name of the class (i.e. a String. |
static int |
K_DOUBLE
Constant indicating that the value kind is a double represented by
an instance of Double. |
static int |
K_FLOAT
Constant indicating that the value kind is a float represented by
an instance of Float. |
static int |
K_INT
Constant indicating that the value kind is an int represented by
an instance of Integer. |
static int |
K_LONG
Constant indicating that the value kind is a long represented by
an instance of Long. |
static int |
K_QUALIFIED_NAME
Constant indicating that the value is a qualified name represented by a String. |
static int |
K_SHORT
Constant indicating that the value kind is a short represented by
an instance of Short. |
static int |
K_SIMPLE_NAME
Constant indicating that the value is a simple name represented by a String. |
static int |
K_STRING
Constant indicating that the value kind is a String represented by
the corresponding String. |
static int |
K_UNKNOWN
Constant indicating that the value kind is unknown at this stage. |
| Method Summary | |
|---|---|
String |
getMemberName()
Returns the member's name of this member-value pair. |
Object |
getValue()
Returns the value of this member-value pair. |
int |
getValueKind()
Returns the value kind of this member-value pair. |
| Field Detail |
|---|
static final int K_INT
int represented by
an instance of Integer.
static final int K_BYTE
byte represented by
an instance of Byte.
static final int K_SHORT
short represented by
an instance of Short.
static final int K_CHAR
char represented by
an instance of Character.
static final int K_FLOAT
float represented by
an instance of Float.
static final int K_DOUBLE
double represented by
an instance of Double.
static final int K_LONG
long represented by
an instance of Long.
static final int K_BOOLEAN
boolean represented by
an instance of Boolean.
static final int K_STRING
String represented by
the corresponding String.
static final int K_ANNOTATION
IAnnotation.
static final int K_CLASS
Class represented by
the name of the class (i.e. a String. If the member-value pair is coming from
a compilation unit, this is either a simple name (e.g. for MyType.class,
the name is "MyType"), or a qualified name (e.g. for x.y.MyType.MyNestedType.class,
the name is "x.y.MyType.MyNestedType"). If the member-value pair is coming from a class file, this is
always a fully qualified name.
Note that one can use IType.resolveType(String) and e.g.
IJavaProject.findType(String, String, org.eclipse.core.runtime.IProgressMonitor)
to find the corresponding IType.
static final int K_QUALIFIED_NAME
String. The qualified name refers to an enum constant or another
compile-time constant if the code is correct (e.g. "MyEnum.FIRST").
static final int K_SIMPLE_NAME
String. The simple name refers to an enum constant or another
compile-time constant if the code is correct (e.g. "FIRST" when there is
a static import for "MyEnum.FIRST").
static final int K_UNKNOWN
@MyAnnot(1 + 2.3) the kind of the expression "1 + 2.3" is
unknown@MyAnnot({})@MyAnnot({3.4, 1 + 2.3}),
the kind of the second element "1 + 2.3" is unknown.@MyAnnot({1, 2.3, "abc"})null, or an
array containing Objects and/or nulls for unknown elements.
| Method Detail |
|---|
String getMemberName()
Object getValue()
value kind. It is an
instance of Object[] if the value is an array.
If the value kind is K_UNKNOWN and the value is not an array, then the
value is null.
If the value kind is K_UNKNOWN and the value is an array, then the
value is an array containing Objects and/or nulls for
unknown elements.
See K_UNKNOWN for more details.
int getValueKind()
value, or the instance of the elements if the value
is an array. The value kind is one of the following constants:
K_ANNOTATION, K_BOOLEAN, K_BYTE, K_CHAR,
K_CLASS, K_DOUBLE, K_FLOAT, K_INT, K_LONG,
K_QUALIFIED_NAME, K_SIMPLE_NAME, K_SHORT, K_STRING,
K_UNKNOWN.
|
Eclipse JDT Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved.