X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fcommons%2Fconcepts%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconcepts%2Ftransform%2FCompositeClassBasedTransformer.java;fp=opendaylight%2Fcommons%2Fconcepts%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconcepts%2Ftransform%2FCompositeClassBasedTransformer.java;h=dae949912b96cfe564e018e2b99146597d26d626;hp=fa6408d3d11ce89ea463c02a14a886aa1b573808;hb=eb9e1983a0fce7e4a381eff33e40cae957cddf53;hpb=0cfc417107d5b5b1bafdd7ee1fe8e3ba052d5488 diff --git a/opendaylight/commons/concepts/src/main/java/org/opendaylight/controller/concepts/transform/CompositeClassBasedTransformer.java b/opendaylight/commons/concepts/src/main/java/org/opendaylight/controller/concepts/transform/CompositeClassBasedTransformer.java index fa6408d3d1..dae949912b 100644 --- a/opendaylight/commons/concepts/src/main/java/org/opendaylight/controller/concepts/transform/CompositeClassBasedTransformer.java +++ b/opendaylight/commons/concepts/src/main/java/org/opendaylight/controller/concepts/transform/CompositeClassBasedTransformer.java @@ -17,26 +17,26 @@ import java.util.concurrent.ConcurrentHashMap; /** * Transformer which aggregates multiple implementations of * {@link InputClassBasedTransformer}. - * + * * The transformation process is driven by {@link Class} of input. The selection * of used {@link InputClassBasedTransformer} is done by using the {@link Class} * of input as a key to select the transformer. - * + * * This approach provides quick resolution of transformer, but does not support * registering a super type of input to provide transformation support for all * subclasses, one must register a new instance of transformer for each valid * input class. - * + * * If you need more flexible selection of transformation consider using * {@link CompositeConditionalTransformer} which is slower but most flexible or * {@link RuleBasedTransformer} which provides declarative approach for * transformation. - * + * * See {@link #transform(Object)} for more information about tranformation * process. - * + * * @author Tony Tkacik - * + * * @param * Input super-type * @param

@@ -50,18 +50,18 @@ public abstract class CompositeClassBasedTransformer implements /** * Transforms an input into instance of Product class. - * + * * The final registered transformer is the one which match following * condition: - * + * * input.getClass() == transformer.getInputClass() - * + * * This means that transformers are not resolved by class hierarchy, only * selected based on final class of the input. If you need more flexible * selection of transformation consider using * {@link CompositeConditionalTransformer} which is slower but more * flexible. - * + * */ @Override public P transform(I input) { @@ -76,11 +76,11 @@ public abstract class CompositeClassBasedTransformer implements /** * Registers a new transformer. - * + * * The transformer is registered for class returned by * {@link InputClassBasedTransformer#getInputClass()}. Only one transformer * can be registered for particular input class. - * + * */ public void addTransformer( InputClassBasedTransformer transformer) @@ -95,9 +95,9 @@ public abstract class CompositeClassBasedTransformer implements /** * Removes an registered transformer. - * + * * Note: Removal is currently unsupported. - * + * * @param transformer * Tranformer to be removed. * @throws IllegalArgumentException @@ -108,7 +108,7 @@ public abstract class CompositeClassBasedTransformer implements throws IllegalArgumentException { throw new UnsupportedOperationException("Not implemented yet"); } - + @Override public Collection

transformAll(Collection inputs) { Collection

ret = new ArrayList

();