|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception org.jwalk.JWalkException org.jwalk.PermissionException
public class PermissionException
PermissionException signals the refusal to execute a class or a generator.
This exception may be raised if an attempt is made to instantiate a class
which is non-public, abstract, or an interface. Likewise, it may be raised
if the user supplies a non-public or abstract custom generator, which could
not then be instantiated and executed. The exception may be queried before
it is handled, to support giving different feedback.
If testClassRefused()
is true, the exception was raised for
the test class, which was inaccessible, abstract, or an interface.
If generatorRefused()
is true, the exception was raised for a
custom generator, which was inaccessible, or partly abstract.
Access is provided to the class type, or generator type, which denied
permission to be executed.
Constructor Summary | |
---|---|
PermissionException(java.lang.Class<?> type)
Creates a PermissionException for a class which refused permission to execute. |
|
PermissionException(java.lang.Class<?> type,
boolean generator)
Creates a PermissionException for a generator which refused permission to execute. |
|
PermissionException(java.lang.Class<?> type,
java.lang.String message)
Creates a PermissionException for a class which refused permission to execute, with a specific error message. |
Method Summary | |
---|---|
boolean |
generatorRefused()
Reports whether the refusing class is a generator. |
java.lang.Class<?> |
getType()
Returns the type which refused permission to execute. |
boolean |
testClassRefused()
Reports whether the refusing class is the test class. |
Methods inherited from class org.jwalk.JWalkException |
---|
getError |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PermissionException(java.lang.Class<?> type)
type
- the class which refused permission.public PermissionException(java.lang.Class<?> type, java.lang.String message)
type
- the class which refused permission.message
- the specific error message.public PermissionException(java.lang.Class<?> type, boolean generator)
type
- the class which refused permission.generator
- a flag indicating this was a generator.Method Detail |
---|
public java.lang.Class<?> getType()
public boolean testClassRefused()
public boolean generatorRefused()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |