@Test @SuppressWarnings({ "rawtypes", "unchecked" }) public void testJsonDdlObject() { JsonDdlObject<?> obj = createStrictMock(JsonDdlObject.class); JsonDdlObject.Builder builder = createStrictMock(JsonDdlObject.Builder.class); expect(builder.build()).andReturn(obj).times(2); replay(obj, builder); assertSame(obj, Protected.object((Object) obj)); assertSame(obj, Protected.object((Object) builder)); assertSame(obj, Protected.object((JsonDdlObject) obj)); assertSame(obj, Protected.object((JsonDdlObject) builder)); verify(obj, builder); }
public static <J extends JsonDdlObject<J>> J object(J value) { if (value instanceof JsonDdlObject.Builder) { return ((JsonDdlObject.Builder<J>) value).build(); } return value; }
Protected { public static <J extends JsonDdlObject<J>> J object(J value) { if (value instanceof JsonDdlObject.Builder) { return ((JsonDdlObject.Builder<J>) value).build(); } return value; } }
Protected { public static <J extends JsonDdlObject<J>> J object(J value) { if (value instanceof JsonDdlObject.Builder) { return ((JsonDdlObject.Builder<J>) value).build(); } return value; }  }
Protected { public static <J extends JsonDdlObject<J>> J object(J value) { if (value instanceof JsonDdlObject.Builder) { return ((JsonDdlObject.Builder<J>) value).build(); } return value; }  static J object(J value); static List<T> object(List<T> values); static Map<K, V> object(Map<K, V> values); @SuppressWarnings("unchecked") static T object(T value); }
Protected { public static <J extends JsonDdlObject<J>> J object(J value) { if (value instanceof JsonDdlObject.Builder) { return ((JsonDdlObject.Builder<J>) value).build(); } return value; }  static J object(J value); static List<T> object(List<T> values); static Map<K, V> object(Map<K, V> values); @SuppressWarnings("unchecked") static T object(T value);  }