/** * Returns the {@link SerializedType} of the serialized token. * * @return the serialized type of the token */ protected SerializedType getTokenType() { return new SimpleSerializedType(tokenType, null); }
/** * Initializes a SimpleSerializedObject using given {@code data} and a serialized type identified by given * {@code type} and {@code revision}. * * @param data The data of the serialized object * @param dataType The type of data * @param type The type identifying the serialized object * @param revision The revision of the serialized object */ public SimpleSerializedObject(T data, Class<T> dataType, String type, String revision) { this(data, dataType, new SimpleSerializedType(type, revision)); }
@Override @SuppressWarnings("unchecked") public SerializedObject<T> getPayload() { return new SimpleSerializedObject<>(payload, (Class<T>) payload.getClass(), new SimpleSerializedType(payloadType, payloadRevision)); } }
@Override public SerializedType typeForClass(Class type) { return new SimpleSerializedType(type.getName(), revisionOf(type)); }
private SerializedType getSerializedType(Object instance) { SerializedType serializedType; if (instance == null) { serializedType = SimpleSerializedType.emptyType(); } else { serializedType = new SimpleSerializedType(instance.getClass().getName(), revisionOf(instance.getClass())); } return serializedType; }
@Override public SerializedType typeForClass(Class type) { if (type == null || Void.TYPE.equals(type) || Void.class.equals(type)) { return SimpleSerializedType.emptyType(); } return new SimpleSerializedType(type.getName(), revisionResolver.revisionOf(type)); }
@Override public SerializedType typeForClass(Class type) { if (type == null || Void.TYPE.equals(type) || Void.class.equals(type)) { return SimpleSerializedType.emptyType(); } return new SimpleSerializedType(typeIdentifierOf(type), revisionOf(type)); }
/** * Returns the {@link SerializedType} of the serialized token. * * @return the serialized type of the token */ protected SerializedType getTokenType() { return new SimpleSerializedType(tokenType, null); }
/** * Initializes a SimpleSerializedObject using given {@code data} and a serialized type identified by given * {@code type} and {@code revision}. * * @param data The data of the serialized object * @param dataType The type of data * @param type The type identifying the serialized object * @param revision The revision of the serialized object */ public SimpleSerializedObject(T data, Class<T> dataType, String type, String revision) { this(data, dataType, new SimpleSerializedType(type, revision)); }
/** * Returns the {@link SerializedType} of the serialized token. * * @return the serialized type of the token */ protected SerializedType getTokenType() { return new SimpleSerializedType(tokenType, null); }
/** * Initializes a SimpleSerializedObject using given {@code data} and a serialized type identified by given * {@code type} and {@code revision}. * * @param data The data of the serialized object * @param dataType The type of data * @param type The type identifying the serialized object * @param revision The revision of the serialized object */ public SimpleSerializedObject(T data, Class<T> dataType, String type, String revision) { this(data, dataType, new SimpleSerializedType(type, revision)); }
@Override @SuppressWarnings("unchecked") public SerializedObject<T> getPayload() { return new SimpleSerializedObject<>(payload, (Class<T>) payload.getClass(), new SimpleSerializedType(payloadType, payloadRevision)); } }
@Override @SuppressWarnings("unchecked") public SerializedObject<T> getPayload() { return new SimpleSerializedObject<>(payload, (Class<T>) payload.getClass(), new SimpleSerializedType(payloadType, payloadRevision)); } }
@Override public SerializedType typeForClass(Class type) { return new SimpleSerializedType(type.getName(), revisionOf(type)); }
private SerializedType getSerializedType(Object instance) { SerializedType serializedType; if (instance == null) { serializedType = SimpleSerializedType.emptyType(); } else { serializedType = new SimpleSerializedType(instance.getClass().getName(), revisionOf(instance.getClass())); } return serializedType; }
@Override public SerializedType typeForClass(Class type) { if (type == null || Void.TYPE.equals(type) || Void.class.equals(type)) { return SimpleSerializedType.emptyType(); } return new SimpleSerializedType(type.getName(), revisionResolver.revisionOf(type)); }
@Override public SerializedType typeForClass(Class type) { if (type == null || Void.TYPE.equals(type) || Void.class.equals(type)) { return SimpleSerializedType.emptyType(); } return new SimpleSerializedType(type.getName(), revisionResolver.revisionOf(type)); }
private SerializedType getSerializedType(Object instance) { SerializedType serializedType; if (instance == null) { serializedType = SimpleSerializedType.emptyType(); } else { serializedType = new SimpleSerializedType(instance.getClass().getName(), revisionOf(instance.getClass())); } return serializedType; }
@Override public SerializedType typeForClass(Class type) { if (type == null || Void.TYPE.equals(type) || Void.class.equals(type)) { return SimpleSerializedType.emptyType(); } return new SimpleSerializedType(typeIdentifierOf(type), revisionOf(type)); }
@Override public SerializedType typeForClass(Class type) { if (type == null || Void.TYPE.equals(type) || Void.class.equals(type)) { return SimpleSerializedType.emptyType(); } return new SimpleSerializedType(typeIdentifierOf(type), revisionOf(type)); }