throw new UnsupportedOperationException("Utility class");
}
- public static final Optional<SchemaNode> getOriginalIfPossible(final SchemaNode node) {
- if(node instanceof DerivableSchemaNode) {
+ public static Optional<SchemaNode> getOriginalIfPossible(final SchemaNode node) {
+ if (node instanceof DerivableSchemaNode) {
@SuppressWarnings("unchecked")
final Optional<SchemaNode> ret = (Optional<SchemaNode>) (((DerivableSchemaNode) node).getOriginal());
return ret;
return Optional.absent();
}
- public static final SchemaNode getRootOriginalIfPossible(final SchemaNode data) {
+ public static SchemaNode getRootOriginalIfPossible(final SchemaNode data) {
Optional<SchemaNode> previous = Optional.absent();
Optional<SchemaNode> next = getOriginalIfPossible(data);
- while(next.isPresent()) {
+ while (next.isPresent()) {
previous = next;
next = getOriginalIfPossible(next.get());
}
* @param qname input or output QName with namespace same as RPC
* @return input or output schema. Returns null if RPC does not have input/output specified.
*/
- public static @Nullable ContainerSchemaNode getRpcDataSchema(final @Nonnull RpcDefinition rpc, @Nonnull final QName qname) {
+ @Nullable public static ContainerSchemaNode getRpcDataSchema(@Nonnull final RpcDefinition rpc, @Nonnull final QName qname) {
Preconditions.checkNotNull(rpc, "Rpc Schema must not be null");
Preconditions.checkNotNull(qname,"QName must not be null");
switch (qname.getLocalName()) {