org.jaitools.jiffle.parser
Enum Message

java.lang.Object
  extended by java.lang.Enum<Message>
      extended by org.jaitools.jiffle.parser.Message
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Message>

public enum Message
extends java.lang.Enum<Message>

Constants used by the Jiffle script and tree parsers to report errors and warnings.

Since:
0.1
Version:
$Id: Message.java 1653 2011-06-16 10:23:02Z michael.bedward $
Author:
Michael Bedward
See Also:
Level

Enum Constant Summary
ASSIGNMENT_LIST_TO_SCALAR
          Error: attempting to assign a list to a scalar variable.
ASSIGNMENT_SCALAR_TO_LIST
          Error: attempting to assign a scalar to a list variable.
ASSIGNMENT_TO_LOOP_VAR
          Error: attempting to assign a value to a loop variable.
ASSIGNMENT_TO_SRC_IMAGE
          Error: Invalid use of an image variable for both input and output.
CONSTANT_LHS
          Error: constant on the left hand side of an assignment.
IMAGE_NOT_USED
          Warning: an image variable parameter was passed to Jiffle but not used in the script.
IMAGE_POS_ON_DEST
          Error: Image position syntax cannot be used with a destination image variable.
IMAGE_POS_ON_NON_IMAGE
          Error: trying to use image position syntax with a non-image variable.
IMAGE_VAR_INIT_LHS
          Error: trying to assign a value to an image variable in the init block.
INVALID_ASSIGNMENT_OP_WITH_DEST_IMAGE
          Error: using an assignment operator other than '=' with a destination image variable.
INVALID_OPERATION_FOR_LIST
          Error: invalid operation for a list variable.
INVALID_OPTION
          Warning: script option not recognized.
INVALID_OPTION_VALUE
          Warning: invalid script option value is ignored.
NON_LIST_FUNCTION
          Error: list arg invalid for this function
READING_FROM_DEST_IMAGE
          Error: trying to read from a destination image.
SRC_IMAGE_IN_INIT_BLOCK
          Error: source image variable cannot appear in the init block.
UNDECLARED_LIST_VAR
          Error: list operation with an undeclared list variable.
UNDEFINED_FUNCTION
          Error: call to an undefined function.
UNINIT_VAR
          Error: a non-image variable used before being assigned a value.
 
Method Summary
 boolean isError()
          Tests if this is an error
 boolean isWarning()
          Tests if this is a warning.
 java.lang.String toString()
          Returns a formatted string for the error or warning.
static Message valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Message[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ASSIGNMENT_TO_SRC_IMAGE

public static final Message ASSIGNMENT_TO_SRC_IMAGE
Error: Invalid use of an image variable for both input and output.


ASSIGNMENT_TO_LOOP_VAR

public static final Message ASSIGNMENT_TO_LOOP_VAR
Error: attempting to assign a value to a loop variable.


ASSIGNMENT_LIST_TO_SCALAR

public static final Message ASSIGNMENT_LIST_TO_SCALAR
Error: attempting to assign a list to a scalar variable.


ASSIGNMENT_SCALAR_TO_LIST

public static final Message ASSIGNMENT_SCALAR_TO_LIST
Error: attempting to assign a scalar to a list variable.


CONSTANT_LHS

public static final Message CONSTANT_LHS
Error: constant on the left hand side of an assignment.


IMAGE_NOT_USED

public static final Message IMAGE_NOT_USED
Warning: an image variable parameter was passed to Jiffle but not used in the script.


IMAGE_VAR_INIT_LHS

public static final Message IMAGE_VAR_INIT_LHS
Error: trying to assign a value to an image variable in the init block.


INVALID_ASSIGNMENT_OP_WITH_DEST_IMAGE

public static final Message INVALID_ASSIGNMENT_OP_WITH_DEST_IMAGE
Error: using an assignment operator other than '=' with a destination image variable.


INVALID_OPERATION_FOR_LIST

public static final Message INVALID_OPERATION_FOR_LIST
Error: invalid operation for a list variable.


INVALID_OPTION

public static final Message INVALID_OPTION
Warning: script option not recognized.


INVALID_OPTION_VALUE

public static final Message INVALID_OPTION_VALUE
Warning: invalid script option value is ignored.


IMAGE_POS_ON_DEST

public static final Message IMAGE_POS_ON_DEST
Error: Image position syntax cannot be used with a destination image variable.


IMAGE_POS_ON_NON_IMAGE

public static final Message IMAGE_POS_ON_NON_IMAGE
Error: trying to use image position syntax with a non-image variable.


NON_LIST_FUNCTION

public static final Message NON_LIST_FUNCTION
Error: list arg invalid for this function


READING_FROM_DEST_IMAGE

public static final Message READING_FROM_DEST_IMAGE
Error: trying to read from a destination image.


SRC_IMAGE_IN_INIT_BLOCK

public static final Message SRC_IMAGE_IN_INIT_BLOCK
Error: source image variable cannot appear in the init block.


UNDECLARED_LIST_VAR

public static final Message UNDECLARED_LIST_VAR
Error: list operation with an undeclared list variable.


UNDEFINED_FUNCTION

public static final Message UNDEFINED_FUNCTION
Error: call to an undefined function.


UNINIT_VAR

public static final Message UNINIT_VAR
Error: a non-image variable used before being assigned a value.

Method Detail

values

public static Message[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Message c : Message.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Message valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isError

public boolean isError()
Tests if this is an error

Returns:
true if an error, false otherwise

isWarning

public boolean isWarning()
Tests if this is a warning.

Returns:
true if a warning, false otherwise

toString

public java.lang.String toString()
Returns a formatted string for the error or warning.

Overrides:
toString in class java.lang.Enum<Message>
Returns:
a string


Copyright © 2011. All Rights Reserved.