Package org.openjdk.jmc.common.unit
Class QuantityConversionException.Persisted
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.openjdk.jmc.common.unit.QuantityConversionException
-
- org.openjdk.jmc.common.unit.QuantityConversionException.Persisted
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- QuantityConversionException
public static class QuantityConversionException.Persisted extends QuantityConversionException
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openjdk.jmc.common.unit.QuantityConversionException
QuantityConversionException.Persisted, QuantityConversionException.Problem, QuantityConversionException.Quantity
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object
badValue
protected IPersister<?>
persister
protected java.lang.Object
prototype
private static long
serialVersionUID
-
Fields inherited from class org.openjdk.jmc.common.unit.QuantityConversionException
badString, problem
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Persisted(QuantityConversionException.Problem problem, java.lang.Object badValue, java.lang.Object prototype, IPersister<?> persister)
private
Persisted(QuantityConversionException.Problem problem, java.lang.String badString, java.lang.Object prototype, IPersister<?> persister)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getInteractivePrototype()
Prototype value suitable to be presented to a human.java.lang.String
getLocalizedMessage()
java.lang.String
getMessage()
java.lang.String
getPersistablePrototype()
Prototype value suitable to be persisted or logged.private <T> java.lang.String
interactive(T value)
private <T> java.lang.String
persistable(T value)
-
Methods inherited from class org.openjdk.jmc.common.unit.QuantityConversionException
belowPrecision, belowPrecision, conflictingConstraints, getBadString, getProblem, noUnit, noUnit, tooHigh, tooHigh, tooLow, tooLow, toString, unknownUnit, unknownUnit, unparsable, unparsable
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
badValue
protected final java.lang.Object badValue
-
prototype
protected final java.lang.Object prototype
-
persister
protected final transient IPersister<?> persister
-
-
Constructor Detail
-
Persisted
private Persisted(QuantityConversionException.Problem problem, java.lang.String badString, java.lang.Object prototype, IPersister<?> persister)
-
Persisted
private Persisted(QuantityConversionException.Problem problem, java.lang.Object badValue, java.lang.Object prototype, IPersister<?> persister)
-
-
Method Detail
-
persistable
private <T> java.lang.String persistable(T value)
-
interactive
private <T> java.lang.String interactive(T value)
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classQuantityConversionException
-
getLocalizedMessage
public java.lang.String getLocalizedMessage()
- Overrides:
getLocalizedMessage
in classQuantityConversionException
-
getPersistablePrototype
public java.lang.String getPersistablePrototype()
Description copied from class:QuantityConversionException
Prototype value suitable to be persisted or logged.- Specified by:
getPersistablePrototype
in classQuantityConversionException
- Returns:
- a non-localized (English) value that will prevent this particular problem when parsed.
-
getInteractivePrototype
public java.lang.String getInteractivePrototype()
Description copied from class:QuantityConversionException
Prototype value suitable to be presented to a human. Must not be persisted or logged.- Specified by:
getInteractivePrototype
in classQuantityConversionException
- Returns:
- a localized value that will prevent this particular problem when parsed using interactive parsing.
-
-