I
- the type of the Instruction
S
- the type of the SerializableInstruction
public abstract class InstructionConverter<I extends Instruction,S extends SerializableInstruction> extends Object
InstructionConverter
s are used to convert an Instruction
to a
SerializableInstruction
and vice versa. They can be registered in the
OutlineSerializer
to support custom instruction types.Constructor and Description |
---|
InstructionConverter(Class<I> instructionClass,
Class<S> serializedInstructionClass) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(Instruction instruction) |
boolean |
canHandle(SerializableInstruction instruction) |
I |
convertToInstruction(SerializableInstruction instruction) |
S |
convertToSerializable(Instruction instruction) |
Class<S> |
getSerializedInstructionClass()
Returns the class of the
SerializableInstruction this converter can handle. |
abstract I |
typeSafeConvertToInstruction(S instruction) |
abstract S |
typeSafeConvertToSerializable(I instruction) |
public boolean canHandle(Instruction instruction)
public boolean canHandle(SerializableInstruction instruction)
public final S convertToSerializable(Instruction instruction)
public final I convertToInstruction(SerializableInstruction instruction)
public Class<S> getSerializedInstructionClass()
SerializableInstruction
this converter can handle. This method
is used by the OutlineSerializer
to build a dynamic JAXBContext for the registered
converters.SerializableInstruction
s classCopyright © 2024 levigo holding gmbh. All rights reserved.