|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.attributes.Target
Attribute indicating what elements an attribute may be applied to.
This is checked at runtime. If the attribute is absent, it defaults
to Target.ALL
.
This attribute is intended to be used with attribute classes:
/**
* MyAttribute can only be applied to classes and fields, not methods.
* @@Target(Target.CLASS | Target.FIELD)
*/
public class MyAttribute { ... }
Field Summary | |
static int |
ALL
Indicates that the attribute can be applied to any program element. |
static int |
CLASS
Indicates that the attribute can be applied to a class or interface. |
static int |
CONSTRUCTOR
Indicates that the attribute can be applied to a constructor. |
static int |
CONSTRUCTOR_PARAMETER
Indicates that the attribute can be applied to a constructor parameter. |
static int |
FIELD
Indicates that the attribute can be applied to a field. |
static int |
METHOD
Indicates that the attribute can be applied to a method. |
static int |
METHOD_PARAMETER
Indicates that the attribute can be applied to a method parameter. |
static int |
PARAMETER
Indicates that the attribute can be applied to a parameter of a method or a constructor. |
static int |
RETURN
Indicates that the attribute can be applied to a method return value. |
Constructor Summary | |
Target(int flags)
Creates a new target attribute. |
Method Summary | |
int |
getFlags()
Returns an int that is the bitwise or of the allowed target flags. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CLASS
public static final int FIELD
public static final int METHOD
public static final int CONSTRUCTOR
public static final int METHOD_PARAMETER
public static final int CONSTRUCTOR_PARAMETER
public static final int RETURN
public static final int PARAMETER
METHOD_PARAMETER | CONSTRUCTOR_PARAMETER
.
public static final int ALL
Constructor Detail |
public Target(int flags)
flags
- a bitwise or of flags indicating the allowed targets.Method Detail |
public int getFlags()
int
that is the bitwise or of the allowed target flags.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |