/** * Create a simple value * * @param type the type * @param value the value * @return the simple value */ public static SimpleValue createSimpleValue(SimpleMetaType type, Serializable value) { if (value == null) return null; return new SimpleValueSupport(type, value); }
/** * Create a simple value * * @param <T> the simple type * @param type the type * @param value the value * @return the simple value */ public static <T extends Serializable> SimpleValue<T> createSimpleValue(SimpleMetaType<T> type, T value) { if (value == null) return null; return new SimpleValueSupport<T>(type, value); }
private static SimpleValue wrap(Serializable object, String className) { SimpleMetaType metaType = SimpleMetaType.resolve(className); return new SimpleValueSupport(metaType, object); } public static SimpleValue wrap(boolean value)
/** * Wrap a simple object in simple value * * @param <T> the underlying type * @param object the simple object * @return the simple value */ @SuppressWarnings("unchecked") public static <T extends Serializable> SimpleValue<T> wrap(T object) { if (object == null) return null; String className = object.getClass().getName(); SimpleMetaType<T> metaType = SimpleMetaType.resolve(className); return new SimpleValueSupport<T>(metaType, object); }
return new SimpleValueSupport(metaType, converted);