FileDocCategorySizeDatePackage
EnumConstantNotPresentException.javaAPI DocAndroid 1.5 API2554Wed May 06 22:41:04 BST 2009java.lang

EnumConstantNotPresentException

public class EnumConstantNotPresentException extends RuntimeException
Thrown if an {@code enum} constant does not exist for a particular name.
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
private final Class
enumType
private final String
constantName
Constructors Summary
public EnumConstantNotPresentException(Class enumType, String constantName)
Constructs a new {@code EnumConstantNotPresentException} with the current stack trace and a detail message based on the specified enum type and missing constant name.

param
enumType the enum type.
param
constantName the missing constant name.
since
Android 1.0

        // luni.03=The enum constant {0}.{1} is missing
        super(Msg.getString("luni.03", enumType.getName(), constantName)); //$NON-NLS-1$
        this.enumType = enumType;
        this.constantName = constantName;
    
Methods Summary
public java.lang.StringconstantName()
Gets the name of the missing constant.

return
the name of the constant that has not been found in the enum type.
since
Android 1.0

        return constantName;
    
public java.lang.ClassenumType()
Gets the enum type for which the constant name is missing.

return
the enum type for which a constant name has not been found.
since
Android 1.0

        return enumType;