org.apache.commons.attributes
Class InvalidAttributeTargetError
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Error
|
+--org.apache.commons.attributes.InvalidAttributeTargetError
- All Implemented Interfaces:
- Serializable
- public class InvalidAttributeTargetError
- extends Error
Thrown when an attribute has a Target
declaration that forbids
it being applied to the program element it has been applied to.
For example:
/ **
* This attribute can only be applied to Classes.
* Target(Target.CLASS)
* /
public class MyAttribute {}
public class MyClass {
/ **
* Error: Can't apply MyAttribute to a field!
* MyAttribute()
* /
private String myField;
}
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
InvalidAttributeTargetError
public InvalidAttributeTargetError(String attributeClass,
String element,
int targetFlags)
Copyright © The Apache Software Foundation. All Rights Reserved.