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.ObjectbadValueprotected IPersister<?>persisterprotected java.lang.Objectprototypeprivate static longserialVersionUID-
Fields inherited from class org.openjdk.jmc.common.unit.QuantityConversionException
badString, problem
-
-
Constructor Summary
Constructors Modifier Constructor Description privatePersisted(QuantityConversionException.Problem problem, java.lang.Object badValue, java.lang.Object prototype, IPersister<?> persister)privatePersisted(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.StringgetInteractivePrototype()Prototype value suitable to be presented to a human.java.lang.StringgetLocalizedMessage()java.lang.StringgetMessage()java.lang.StringgetPersistablePrototype()Prototype value suitable to be persisted or logged.private <T> java.lang.Stringinteractive(T value)private <T> java.lang.Stringpersistable(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:
getMessagein classQuantityConversionException
-
getLocalizedMessage
public java.lang.String getLocalizedMessage()
- Overrides:
getLocalizedMessagein classQuantityConversionException
-
getPersistablePrototype
public java.lang.String getPersistablePrototype()
Description copied from class:QuantityConversionExceptionPrototype value suitable to be persisted or logged.- Specified by:
getPersistablePrototypein 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:QuantityConversionExceptionPrototype value suitable to be presented to a human. Must not be persisted or logged.- Specified by:
getInteractivePrototypein classQuantityConversionException- Returns:
- a localized value that will prevent this particular problem when parsed using interactive parsing.
-
-