org.glassfish.apf
Class AnnotationProcessorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.glassfish.apf.AnnotationProcessorException
All Implemented Interfaces:
java.io.Serializable

public class AnnotationProcessorException
extends java.lang.Exception

Exception that denotes a warning or error condition in the annotation procesing tool

Author:
Jerome Dochez
See Also:
Serialized Form

Constructor Summary
AnnotationProcessorException(java.lang.String message)
          Creats a new annotation exception
AnnotationProcessorException(java.lang.String message, AnnotationInfo locator)
          Creates a new annotation exception
 
Method Summary
 AnnotationInfo getLocator()
          Return information about the annotation and annotated element which caused the exception or null if it is not available.
 java.lang.String getMessage()
          Return a meaningful string explaining the exception cause
 boolean isFatal()
           
 void setFatal(boolean fatal)
          Sets wether is exception is considered as fatal to the annotation processing.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotationProcessorException

public AnnotationProcessorException(java.lang.String message)
Creats a new annotation exception

Parameters:
message - describing the exception cause

AnnotationProcessorException

public AnnotationProcessorException(java.lang.String message,
                                    AnnotationInfo locator)
Creates a new annotation exception

Parameters:
message - describing the exception cause
locator - gives information about the annotation and the annotated element which caused the exception
Method Detail

getMessage

public java.lang.String getMessage()
Return a meaningful string explaining the exception cause

Overrides:
getMessage in class java.lang.Throwable
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 java.lang.String toString()
Overrides:
toString in class java.lang.Throwable
Returns:
a meaningful description

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 wether is exception is considered as fatal to the annotation processing.

Parameters:
true - if the annotation processing should stop


Copyright © 2012 GlassFish Community. All Rights Reserved.