From: Michael Vorburger Date: Thu, 21 Jun 2018 15:21:43 +0000 (+0200) Subject: minor Checkstyle compliance issues in BindingRuntimeContext X-Git-Tag: release/fluorine~162 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=ee710742fe44c5114c2867ca148aa7c166d9c599;p=mdsal.git minor Checkstyle compliance issues in BindingRuntimeContext Change-Id: Ic904359ecb0df84420e05cd00610151a3ea44f49 Signed-off-by: Michael Vorburger --- diff --git a/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/util/BindingRuntimeContext.java b/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/util/BindingRuntimeContext.java index cd05f552af..f1c900d3f7 100644 --- a/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/util/BindingRuntimeContext.java +++ b/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/util/BindingRuntimeContext.java @@ -63,23 +63,21 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * * Runtime Context for Java YANG Binding classes * - *

- * Runtime Context provides additional insight in Java YANG Binding, + *

Runtime Context provides additional insight in Java YANG Binding, * binding classes and underlying YANG schema, it contains * runtime information, which could not be derived from generated * classes alone using {@link org.opendaylight.yangtools.yang.binding.util.BindingReflections}. - *

- * Some of this information are for example list of all available + * + *

Some of this information are for example list of all available * children for cases {@link #getChoiceCaseChildren(DataNodeContainer)}, since * choices are augmentable and new choices may be introduced by additional models. - *

- * Same goes for all possible augmentations. * + *

Same goes for all possible augmentations. */ -public class BindingRuntimeContext implements Immutable { +public final class BindingRuntimeContext implements Immutable { + private static final Logger LOG = LoggerFactory.getLogger(BindingRuntimeContext.class); private static final char DOT = '.'; @@ -108,14 +106,13 @@ public class BindingRuntimeContext implements Immutable { } /** - * * Creates Binding Runtime Context from supplied class loading strategy and schema context. * * @param strategy Class loading strategy to retrieve generated Binding classes * @param ctx Schema Context which describes YANG model and to which Binding classes should be mapped * @return Instance of BindingRuntimeContext for supplied schema context. */ - public static final BindingRuntimeContext create(final ClassLoadingStrategy strategy, final SchemaContext ctx) { + public static BindingRuntimeContext create(final ClassLoadingStrategy strategy, final SchemaContext ctx) { return new BindingRuntimeContext(strategy, ctx); } @@ -139,18 +136,19 @@ public class BindingRuntimeContext implements Immutable { } /** - * Returns schema of augmentation - *

- * Returned schema is schema definition from which augmentation class was generated. + * Returns schema of augmentation. + * + *

Returned schema is schema definition from which augmentation class was generated. * This schema is isolated from other augmentations. This means it contains * augmentation definition as was present in original YANG module. - *

- * Children of returned schema does not contain any additional augmentations, + * + *

Children of returned schema does not contain any additional augmentations, * which may be present in runtime for them, thus returned schema is unsuitable * for use for validation of data. - *

- * For retrieving {@link AugmentationSchemaNode}, which will contains - * full model for child nodes, you should use method {@link #getResolvedAugmentationSchema(DataNodeContainer, Class)} + * + *

For retrieving {@link AugmentationSchemaNode}, which will contains + * full model for child nodes, you should use method + * {@link #getResolvedAugmentationSchema(DataNodeContainer, Class)} * which will return augmentation schema derived from supplied augmentation target * schema. * @@ -167,12 +165,11 @@ public class BindingRuntimeContext implements Immutable { /** * Returns defining {@link DataSchemaNode} for supplied class. * - *

- * Returned schema is schema definition from which class was generated. + *

Returned schema is schema definition from which class was generated. * This schema may be isolated from augmentations, if supplied class * represent node, which was child of grouping or augmentation. - *

- * For getting augmentation schema from augmentation class use + * + *

For getting augmentation schema from augmentation class use * {@link #getAugmentationDefinition(Class)} instead. * * @param cls Class which represents list, container, choice or case. @@ -224,8 +221,7 @@ public class BindingRuntimeContext implements Immutable { } /** - * - * Returns resolved case schema for supplied class + * Returns resolved case schema for supplied class. * * @param schema Resolved parent choice schema * @param childClass Class representing case. @@ -305,7 +301,7 @@ public class BindingRuntimeContext implements Immutable { } /** - * Map enum constants: yang - java + * Map enum constants: yang - java. * * @param enumClass enum generated class * @return mapped enum constants from yang with their corresponding values in generated binding classes @@ -316,7 +312,7 @@ public class BindingRuntimeContext implements Immutable { } /** - * Map enum constants: yang - java + * Map enum constants: yang - java. * * @param enumClassName enum generated class name * @return mapped enum constants from yang with their corresponding values in generated binding classes @@ -390,7 +386,7 @@ public class BindingRuntimeContext implements Immutable { public Set> getCases(final Class choice) { final Collection cazes = runtimeTypes.findCases(referencedType(choice)); final Set> ret = new HashSet<>(cazes.size()); - for(final Type caze : cazes) { + for (final Type caze : cazes) { try { final Class c = strategy.loadClass(caze); ret.add(c);