Package org.glassfish.apf
Class AnnotationProcessorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.glassfish.apf.AnnotationProcessorException
-
- All Implemented Interfaces:
Serializable
public class AnnotationProcessorException extends Exception
Exception that denotes a warning or error condition in the annotation processing tool- Author:
- Jerome Dochez
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AnnotationProcessorException(String message)
Creats a new annotation exceptionAnnotationProcessorException(String message, AnnotationInfo locator)
Creates a new annotation exception
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationInfo
getLocator()
Return information about the annotation and annotated element which caused the exception or null if it is not available.String
getMessage()
Return a meaningful string explaining the exception causeboolean
isFatal()
void
setFatal(boolean fatal)
Sets whether is exception is considered as fatal to the annotation processing.String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
AnnotationProcessorException
public AnnotationProcessorException(String message)
Creats a new annotation exception- Parameters:
message
- describing the exception cause
-
AnnotationProcessorException
public AnnotationProcessorException(String message, AnnotationInfo locator)
Creates a new annotation exception- Parameters:
message
- describing the exception causelocator
- gives information about the annotation and the annotated element which caused the exception
-
-
Method Detail
-
getMessage
public String getMessage()
Return a meaningful string explaining the exception cause- Overrides:
getMessage
in classThrowable
- Returns:
- the exception reason
-
getLocator
public AnnotationInfo getLocator()
Return information about the annotation and annotated element which caused the exception or null if it is not available.- Returns:
- the annotation info instance
-
toString
public String toString()
-
isFatal
public boolean isFatal()
- Returns:
- true if this exception was considered by the sender as being fatal to the annotations processing(i.e. it should stop).
-
setFatal
public void setFatal(boolean fatal)
Sets whether is exception is considered as fatal to the annotation processing.- Parameters:
fatal
- true if the annotation processing should stop
-
-