Updated PoC APIs of Model-driven SAL
[controller.git] / opendaylight / sal / yang-prototype / concepts-lang / src / main / java / org / opendaylight / controller / concepts / lang / InputClassBasedTransformer.java
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/InputClassBasedTransformer.java b/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/InputClassBasedTransformer.java
new file mode 100644 (file)
index 0000000..e6a1024
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.controller.concepts.lang;
+/**
+ * Input class based transformer
+ *
+ * {@link Transformer} which accepts / transforms only specific classes of
+ * input, and is useful if the selection of transformer should be based on the
+ * class of the input and there is one-to-one mapping between input class and
+ * transformer.
+ *
+ *
+ * @author Tony Tkacik
+ *
+ * @param <S>
+ *            Common supertype of input
+ * @param <I>
+ *            Concrete type of input
+ * @param <P>
+ *            Product
+ */
+public interface InputClassBasedTransformer<S, I extends S, P> extends
+        Transformer<I, P> {
+
+    /**
+     * Returns an {@link Class} of input which is acceptable for transformation.
+     *
+     * @return {@link Class} of input which is acceptable for transformation.
+     */
+    Class<? extends S> getInputClass();
+}