Remove deprecated Types methods 76/86476/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 18 Dec 2019 10:25:02 +0000 (11:25 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 18 Dec 2019 11:34:12 +0000 (12:34 +0100)
Types methods dealing with binding concepts have been migrated
to BindingTypes, remove their residence.

Change-Id: Idb1710ba888dd40f630389028702c209904d443a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-generator-util/src/main/java/org/opendaylight/mdsal/binding/model/util/Types.java
binding/mdsal-binding-generator-util/src/test/java/org/opendaylight/mdsal/binding/model/util/TypesTest.java
binding/mdsal-binding-java-api-generator/src/test/java/org/opendaylight/mdsal/binding/java/api/generator/test/GeneratorJavaFileTest.java

index eefeaa26b035b2fa9456d68c0ab7ee7168db7924..8b0b2c8927bc2b4e8a4897488161495d25c9f9f9 100644 (file)
@@ -233,40 +233,6 @@ public final class Types {
         return new WildcardTypeImpl(identifier);
     }
 
-    /**
-     * Creates instance of
-     * {@link org.opendaylight.mdsal.binding.model.api.ParameterizedType
-     * ParameterizedType} where raw type is
-     * {@link org.opendaylight.yangtools.yang.binding.Augmentable} and actual
-     * parameter is <code>valueType</code>.
-     *
-     * @param valueType JAVA <code>Type</code> with actual parameter
-     * @return <code>ParametrizedType</code> representation of raw type
-     *         <code>Augmentable</code> with actual parameter
-     *         <code>valueType</code>
-     * @deprecated Use {@link BindingTypes#augmentable(Type)} instead.
-     */
-    @Deprecated(forRemoval = true)
-    public static @NonNull ParameterizedType augmentableTypeFor(final Type valueType) {
-        return BindingTypes.augmentable(valueType);
-    }
-
-    /**
-     * Creates instance of {@link org.opendaylight.mdsal.binding.model.api.ParameterizedType ParameterizedType} where
-     * raw type is {@link org.opendaylight.yangtools.yang.binding.Augmentation} and actual parameter
-     * is <code>valueType</code>.
-     *
-     * @param valueType JAVA <code>Type</code> with actual parameter
-     * @return <code>ParametrizedType</code> representation of raw type
-     *         <code>Augmentation</code> with actual parameter
-     *         <code>valueType</code>
-     * @deprecated Use {@link BindingTypes#augmentation(Type)} instead.
-     */
-    @Deprecated(forRemoval = true)
-    public static @NonNull ParameterizedType augmentationTypeFor(final Type valueType) {
-        return BindingTypes.augmentation(valueType);
-    }
-
     public static @Nullable String getOuterClassName(final Type valueType) {
         return valueType.getIdentifier().immediatelyEnclosingClass().map(Object::toString).orElse(null);
     }
index 0ff2d4077aed5ca8d10c2643ea26d62de7ce43f6..895f02501f97cdc8827da37b820313d27bf3ac85 100644 (file)
@@ -71,30 +71,4 @@ public class TypesTest {
             "WildcardTypeTest"));
         assertEquals("WildcardTypeTest", wildcardType.getName());
     }
-
-    @Deprecated
-    @Test(expected = NullPointerException.class)
-    public void testAugmentableTypeForNull() {
-        Types.augmentableTypeFor(null);
-    }
-
-    @Deprecated
-    @Test(expected = NullPointerException.class)
-    public void augmentationTypeForNull() {
-        Types.augmentationTypeFor(null);
-    }
-
-    @Deprecated
-    @Test
-    public void testAugmentableTypeFor() {
-        ParameterizedType augmentableType = Types.augmentableTypeFor(Types.objectType());
-        assertEquals("Augmentable", augmentableType.getName());
-    }
-
-    @Deprecated
-    @Test
-    public void augmentationTypeFor() {
-        ParameterizedType augmentationType = Types.augmentationTypeFor(Types.objectType());
-        assertEquals("Augmentation", augmentationType.getName());
-    }
 }
index a7db194e49147e286d961141f34faa4e2b2aae70..2091a06a46eb7936a323c9154194e75427fbe126 100644 (file)
@@ -19,7 +19,6 @@ import org.opendaylight.mdsal.binding.model.api.GeneratedType;
 import org.opendaylight.mdsal.binding.model.api.JavaTypeName;
 import org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedTypeBuilder;
 import org.opendaylight.mdsal.binding.model.util.BindingTypes;
-import org.opendaylight.mdsal.binding.model.util.Types;
 import org.opendaylight.mdsal.binding.model.util.generated.type.builder.CodegenGeneratedTypeBuilder;
 
 public class GeneratorJavaFileTest extends BaseCompilationTest {
@@ -30,7 +29,7 @@ public class GeneratorJavaFileTest extends BaseCompilationTest {
     public void test() throws IOException {
         final GeneratedTypeBuilder gtb = new CodegenGeneratedTypeBuilder(JavaTypeName.create(
             "org.opendaylight.controller.gen", "Type4"));
-        gtb.addImplementsType(Types.augmentableTypeFor(gtb));
+        gtb.addImplementsType(BindingTypes.augmentable(gtb));
 
         generateTestSources(Arrays.asList(
             createGeneratedType("org.opendaylight.controller.gen", "Type1"),