org.objectweb.fractal.adl.components
Enum ComponentErrors

java.lang.Object
  extended by java.lang.Enum<ComponentErrors>
      extended by org.objectweb.fractal.adl.components.ComponentErrors
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ComponentErrors>, ErrorTemplate

public enum ComponentErrors
extends java.lang.Enum<ComponentErrors>
implements ErrorTemplate

ErrorTemplate group for the components package.


Enum Constant Summary
COMPONENT_NAME_MISSING
           
DEFINITION_CYCLE
           
DUPLICATED_COMPONENT_NAME
           
INVALID_PATH
           
MERGE_ERROR
           
SHARED_WITH_DIFFERENT_NAME
           
 
Field Summary
static java.lang.String GROUP_ID
          The groupId of ErrorTemplates defined in this enumeration.
 
Method Summary
 int getErrorId()
          Returns the number that identify this ErrorTemplate in its group.
 java.lang.String getFormat()
          Returns the format of the error message that will be issued for errors of that type.
 java.lang.String getFormatedMessage(java.lang.Object... args)
          Returns a formated error message using the given arguments.
 java.lang.String getGroupId()
          Returns the identifier of the error group this ErrorTemplate belongs.
static ComponentErrors valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ComponentErrors[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DEFINITION_CYCLE

public static final ComponentErrors DEFINITION_CYCLE

COMPONENT_NAME_MISSING

public static final ComponentErrors COMPONENT_NAME_MISSING

DUPLICATED_COMPONENT_NAME

public static final ComponentErrors DUPLICATED_COMPONENT_NAME

INVALID_PATH

public static final ComponentErrors INVALID_PATH

SHARED_WITH_DIFFERENT_NAME

public static final ComponentErrors SHARED_WITH_DIFFERENT_NAME

MERGE_ERROR

public static final ComponentErrors MERGE_ERROR
Field Detail

GROUP_ID

public static final java.lang.String GROUP_ID
The groupId of ErrorTemplates defined in this enumeration.

See Also:
Constant Field Values
Method Detail

values

public static ComponentErrors[] 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 (ComponentErrors c : ComponentErrors.values())
    System.out.println(c);

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

valueOf

public static ComponentErrors 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

getErrorId

public int getErrorId()
Description copied from interface: ErrorTemplate
Returns the number that identify this ErrorTemplate in its group. This number must be unique in the error group this ErrorTemplate belongs. It is recommended for this identifier not to be greater that 999.

Specified by:
getErrorId in interface ErrorTemplate
Returns:
the number that identify this ErrorTemplate in its group.

getGroupId

public java.lang.String getGroupId()
Description copied from interface: ErrorTemplate
Returns the identifier of the error group this ErrorTemplate belongs. It is recommended for this identifier string to be upper case and as short as possible ( AC, BC for instance) since it will be issued in the error message as a prefix.

Specified by:
getGroupId in interface ErrorTemplate
Returns:
the identifier of the error group this ErrorTemplate belongs.

getFormatedMessage

public java.lang.String getFormatedMessage(java.lang.Object... args)
Description copied from interface: ErrorTemplate
Returns a formated error message using the given arguments.

Specified by:
getFormatedMessage in interface ErrorTemplate
Parameters:
args - the format arguments.
Returns:
a formated error message.
See Also:
String.format(String, Object...)

getFormat

public java.lang.String getFormat()
Description copied from interface: ErrorTemplate
Returns the format of the error message that will be issued for errors of that type. This string is a "printf like" string as defined in the Formatter class.

Specified by:
getFormat in interface ErrorTemplate
Returns:
the format of the error message that will be issued for errors of that type


Copyright © 2001-2010 ObjectWeb Consortium. All Rights Reserved.