/** * Returns the type that represents an empty message, of undefined type. The type of such message is "empty" and * always has a {@code null} revision. * * @return the type representing an empty message */ static SerializedType emptyType() { return SimpleSerializedType.emptyType(); }
@Override public Class classForType(SerializedType type) { if (SimpleSerializedType.emptyType().equals(type)) { return Void.class; } try { return classLoader.loadClass(resolveClassName(type)); } catch (ClassNotFoundException e) { return UnknownSerializedType.class; } }
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 type that represents an empty message, of undefined type. The type of such message is "empty" and * always has a {@code null} revision. * * @return the type representing an empty message */ static SerializedType emptyType() { return SimpleSerializedType.emptyType(); }
/** * Returns the type that represents an empty message, of undefined type. The type of such message is "empty" and * always has a {@code null} revision. * * @return the type representing an empty message */ static SerializedType emptyType() { return SimpleSerializedType.emptyType(); }
@Override public Class classForType(SerializedType type) { if (SimpleSerializedType.emptyType().equals(type)) { return Void.class; } try { return classLoader.loadClass(resolveClassName(type)); } catch (ClassNotFoundException e) { return UnknownSerializedType.class; } }
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 Class classForType(SerializedType type) throws UnknownSerializedTypeException { if (SimpleSerializedType.emptyType().equals(type)) { return Void.class; } try { return classLoader.loadClass(resolveClassName(type)); } catch (ClassNotFoundException e) { throw new UnknownSerializedTypeException(type, e); } }
@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)); }