- private static DataSchemaNode childByQName( final Object container, final QName name ) {
- if( container instanceof ChoiceCaseNode ) {
- return childByQName( (ChoiceCaseNode) container, name );
- }
- else if( container instanceof ChoiceNode ) {
- return childByQName( (ChoiceNode) container, name );
- }
- else if( container instanceof ContainerSchemaNode ) {
- return childByQName( (ContainerSchemaNode) container, name );
- }
- else if( container instanceof ListSchemaNode ) {
- return childByQName( (ListSchemaNode) container, name );
+ private static DataSchemaNode childByQName(final Object container, final QName name) {
+ if (container instanceof ChoiceCaseNode) {
+ return childByQName((ChoiceCaseNode) container, name);
+ } else if (container instanceof ChoiceNode) {
+ return childByQName((ChoiceNode) container, name);
+ } else if (container instanceof ContainerSchemaNode) {
+ return childByQName((ContainerSchemaNode) container, name);
+ } else if (container instanceof ListSchemaNode) {
+ return childByQName((ListSchemaNode) container, name);
+ } else if (container instanceof DataSchemaNode) {
+ return childByQName((DataSchemaNode) container, name);
+ } else if (container instanceof Module) {
+ return childByQName((Module) container, name);
+ } else {
+ throw new IllegalArgumentException("Unhandled parameter types: "
+ + Arrays.<Object> asList(container, name).toString());