* Name of Enclosing Type
* @return <code>new</code> Instance of Generated Type Builder.
*/
- GeneratedTOBuilder addEnclosingTransferObject(final String name);
+ GeneratedTOBuilder addEnclosingTransferObject(String name);
/**
* Adds new Enclosing Transfer Object <code>genTOBuilder</code> into
* @param genTOBuilder
* Name of Enclosing Type
*/
- T addEnclosingTransferObject(final GeneratedTOBuilder genTOBuilder);
+ T addEnclosingTransferObject(GeneratedTOBuilder genTOBuilder);
/**
* Adds String definition of comment into Method Signature definition. <br>
* @param comment
* Comment String.
*/
- T addComment(final String comment);
+ T addComment(String comment);
/**
* The method creates new AnnotationTypeBuilder containing specified package
* Name of Annotation Type
* @return <code>new</code> instance of Annotation Type Builder.
*/
- AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
+ AnnotationTypeBuilder addAnnotation(String packageName, String name);
boolean isAbstract();
* Type to implement
* @return <code>true</code> if the addition of type is successful.
*/
- T addImplementsType(final Type genType);
+ T addImplementsType(Type genType);
/**
* Adds Constant definition and returns <code>new</code> Constant instance. <br>
* Assigned Value
* @return <code>new</code> Constant instance.
*/
- Constant addConstant(final Type type, final String name, final Object value);
+ Constant addConstant(Type type, String name, Object value);
/**
* Adds new Enumeration definition for Generated Type Builder and returns
* Enumeration Name
* @return <code>new</code> instance of Enumeration Builder.
*/
- EnumBuilder addEnumeration(final String name);
+ EnumBuilder addEnumeration(String name);
List<MethodSignatureBuilder> getMethodDefinitions();
* Name of Method
* @return <code>new</code> instance of Method Signature Builder.
*/
- MethodSignatureBuilder addMethod(final String name);
+ MethodSignatureBuilder addMethod(String name);
/**
* Checks if GeneratedTypeBuilder contains method with name
* @param methodName
* is method name
*/
- boolean containsMethod(final String methodName);
+ boolean containsMethod(String methodName);
List<GeneratedPropertyBuilder> getProperties();
* Name of Property
* @return <code>new</code> instance of Generated Property Builder.
*/
- GeneratedPropertyBuilder addProperty(final String name);
+ GeneratedPropertyBuilder addProperty(String name);
/**
* Check whether GeneratedTOBuilder contains property with name
* of property which existance is checked
* @return true if property <code>name</code> exists in list of properties.
*/
- boolean containsProperty(final String name);
+ boolean containsProperty(String name);
/**
* Set a string that contains a human-readable textual description of type
import com.google.common.base.CharMatcher;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableSet;
+
import java.text.SimpleDateFormat;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.QNameModule;
throw new UnsupportedOperationException("Utility class should not be instantiated");
}
- public static final String getRootPackageName(final QName module) {
+ public static String getRootPackageName(final QName module) {
return getRootPackageName(module.getModule());
}
- public static final String getRootPackageName(final QNameModule module) {
+ public static String getRootPackageName(final QNameModule module) {
checkArgument(module != null, "Module must not be null");
checkArgument(module.getRevision() != null, "Revision must not be null");
checkArgument(module.getNamespace() != null, "Namespace must not be null");
return builder.toString();
}
- public static final String getMethodName(final QName name) {
+ public static String getMethodName(final QName name) {
checkArgument(name != null, "Name should not be null.");
return getMethodName(name.getLocalName());
}
- public static final String getClassName(final String localName) {
+ public static String getClassName(final String localName) {
checkArgument(localName != null, "Name should not be null.");
return toFirstUpper(toCamelCase(localName));
}
- public static final String getMethodName(final String yangIdentifier) {
+ public static String getMethodName(final String yangIdentifier) {
checkArgument(yangIdentifier != null,"Identifier should not be null");
return toFirstLower(toCamelCase(yangIdentifier));
}
- public static final String getClassName(final QName name) {
+ public static String getClassName(final QName name) {
checkArgument(name != null, "Name should not be null.");
return toFirstUpper(toCamelCase(name.getLocalName()));
}
return potential;
}
- private static final String toCamelCase(final String rawString) {
+ private static String toCamelCase(final String rawString) {
checkArgument(rawString != null, "String should not be null");
Iterable<String> components = CAMEL_SPLITTER.split(rawString);
StringBuilder builder = new StringBuilder();
return checkNumericPrefix(builder.toString());
}
- private static final String checkNumericPrefix(final String rawString) {
+ private static String checkNumericPrefix(final String rawString) {
if (rawString == null || rawString.isEmpty()) {
return rawString;
}
@Deprecated
public interface NodeModificationBuilder {
- abstract Node<?> getMutableEquivalent(Node<?> originalNode);
+ Node<?> getMutableEquivalent(Node<?> originalNode);
- abstract CompositeNode buildDiffTree();
+ CompositeNode buildDiffTree();
- abstract void mergeNode(MutableCompositeNode alteredNode);
+ void mergeNode(MutableCompositeNode alteredNode);
- abstract void removeNode(MutableCompositeNode deadNode);
+ void removeNode(MutableCompositeNode deadNode);
- abstract void removeNode(MutableSimpleNode<?> deadNode);
+ void removeNode(MutableSimpleNode<?> deadNode);
- abstract void deleteNode(MutableSimpleNode<?> deadNode);
+ void deleteNode(MutableSimpleNode<?> deadNode);
- abstract void deleteNode(MutableCompositeNode deadNode);
+ void deleteNode(MutableCompositeNode deadNode);
- abstract void replaceNode(MutableCompositeNode replacementNode);
+ void replaceNode(MutableCompositeNode replacementNode);
- abstract void replaceNode(MutableSimpleNode<?> replacementNode);
+ void replaceNode(MutableSimpleNode<?> replacementNode);
- abstract void addNode(MutableCompositeNode newNode);
+ void addNode(MutableCompositeNode newNode);
- abstract void addNode(MutableSimpleNode<?> newNode);
+ void addNode(MutableSimpleNode<?> newNode);
}
throw new UnsupportedOperationException("Utilities class should not be instantiated");
}
- public static final CollectionNodeBuilder<MapEntryNode, MapNode> mapNodeBuilder() {
+ public static CollectionNodeBuilder<MapEntryNode, MapNode> mapNodeBuilder() {
return ImmutableMapNodeBuilder.create();
}
- public static final CollectionNodeBuilder<MapEntryNode, MapNode> mapNodeBuilder(final QName name) {
+ public static CollectionNodeBuilder<MapEntryNode, MapNode> mapNodeBuilder(final QName name) {
return ImmutableMapNodeBuilder.create().withNodeIdentifier(new NodeIdentifier(name));
}
* @param value Value of leaf node
* @return Leaf node with supplied identifier and value
*/
- public static final <T> LeafNode<T> leafNode(final NodeIdentifier name,final T value) {
+ public static <T> LeafNode<T> leafNode(final NodeIdentifier name,final T value) {
return ImmutableLeafNodeBuilder.<T>create()
.withNodeIdentifier(name)
.withValue(value)
}
/**
- *
* Construct immutable leaf node
*
* @param name QName which will be used as node identifier
* @param value Value of leaf node.
* @return Leaf node with supplied identifier and value
*/
- public static final <T> LeafNode<T> leafNode(final QName name,final T value) {
+ public static <T> LeafNode<T> leafNode(final QName name,final T value) {
return leafNode(new NodeIdentifier(name), value);
}