Package org.apache.sis.io
Class ClassFormat
java.lang.Object
java.text.Format
org.apache.sis.io.ClassFormat
- All Implemented Interfaces:
Serializable,Cloneable
Used by
CompoundFormat for formatting the name of objects of type Class.
Thread safety
The sameINSTANCE can be safely used by many threads without synchronization on the part of the caller.
Note that this is specific to ClassFormat and generally not true for arbitrary Format classes.- Since:
- 0.3
- Version:
- 0.3
-
Nested Class Summary
Nested classes/interfaces inherited from class java.text.Format
Format.Field -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ClassFormatThe unique instance.private static final longFor cross-version compatibility. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformat(Object obj, StringBuffer toAppendTo, FieldPosition pos) Formats the given class.parseObject(String source, ParsePosition pos) Cannot parse unqualified class name.private ObjectResolves to the singleton instance on deserialization.Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
INSTANCE
The unique instance.
-
-
Constructor Details
-
ClassFormat
private ClassFormat()For the uniqueINSTANCEonly.
-
-
Method Details
-
format
Formats the given class. The givenobjmust be an instance ofClass, otherwise aClassCastExceptionwill be thrown. -
parseObject
Cannot parse unqualified class name.- Specified by:
parseObjectin classFormat
-
readResolve
Resolves to the singleton instance on deserialization.- Throws:
ObjectStreamException
-