Class InnerCatalogObjectTypeReferenceHandler
- java.lang.Object
-
- org.mule.metadata.persistence.reduced.InnerCatalogObjectTypeReferenceHandler
-
- All Implemented Interfaces:
ObjectTypeReferenceHandler
public class InnerCatalogObjectTypeReferenceHandler extends Object implements ObjectTypeReferenceHandler
ObjectTypeReferenceHandlerimplementation for type serialization that declare an inner type catalog in its serialized structure.- Since:
- 1.2.0, 1.1.7
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<TypeBuilder>readReference(String typeReference)If a ref is found, the type builder is taken from the previously populated catalog.Optional<String>writeReference(ObjectType type, com.google.gson.stream.JsonWriter writer)Writes a type reference if this has an associated type id or uses the identity hashcode to be later fetched from the catalog.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mule.metadata.persistence.ObjectTypeReferenceHandler
shouldWriteReference
-
-
-
-
Method Detail
-
readReference
public Optional<TypeBuilder> readReference(String typeReference)
If a ref is found, the type builder is taken from the previously populated catalog.- Specified by:
readReferencein interfaceObjectTypeReferenceHandler- Parameters:
typeReference- a type id- Returns:
- an
OptionalTypeBuilder
-
writeReference
public Optional<String> writeReference(ObjectType type, com.google.gson.stream.JsonWriter writer)
Writes a type reference if this has an associated type id or uses the identity hashcode to be later fetched from the catalog.- Specified by:
writeReferencein interfaceObjectTypeReferenceHandler- Parameters:
type- the type to writewriter- aJsonWriter- Returns:
- the reference that was written or
Optional.empty()
-
-