org.tinymarbles.exception
Class TypeMismatchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.tinymarbles.exception.AttributeException
org.tinymarbles.exception.IllegalAttributeDefinitionException
org.tinymarbles.exception.TypeMismatchException
- All Implemented Interfaces:
- Serializable
public class TypeMismatchException
- extends IllegalAttributeDefinitionException
Indicates that an attribute definition cannot take place because an attribute with a different type is already declared
for that PType.
- Author:
- duke
- See Also:
PType.putAttribute(String, Class),
Serialized Form
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
TypeMismatchException
public TypeMismatchException(PType type,
String name,
Class valueClass,
Class existingClass)
- Calls the full constructor with an empty cause.
- Parameters:
type - name - valueClass - existingClass -
TypeMismatchException
public TypeMismatchException(Throwable cause,
PType type,
String name,
Class valueClass,
Class existingClass)
- Full constructor.
- Parameters:
cause - the underlying cause for this exceptiontype - the persistent type where the attribute definition failedname - the name of the attributevalueClass - the class of the failed definitionexistingClass - the class of the existing attribute
getExistingClass
public Class getExistingClass()
- Gets the value class of the existing attribute.
- Returns:
- the class of the existing attribute