checkArgument(module.getName() != null, "Module name cannot be NULL."); final DataNodeIterator it = new DataNodeIterator(module); final List<TypeDefinition<?>> typeDefinitions = it.allTypedefs(); checkState(typeDefinitions != null, "Type Definitions for module «module.name» cannot be NULL.");
final List<TypeDefinition<?>> typeDefinitions = it.allTypedefs(); final List<TypeDefinition<?>> listTypeDefinitions = sortTypeDefinitionAccordingDepth(typeDefinitions);
/** * Converts all extended type definitions of module to the list of * <code>Type</code> objects. * * @param module * module from which is obtained set of type definitions * @throws IllegalArgumentException * <ul> * <li>if module is null</li> * <li>if name of module is null</li> * </ul> * @throws IllegalStateException * if set of type definitions from module is null */ private void allTypeDefinitionsToGenTypes(final ModuleContext context) { final Module module = context.module(); checkArgument(module.getName() != null, "Module name cannot be NULL."); final DataNodeIterator it = new DataNodeIterator(module); final List<TypeDefinition<?>> typeDefinitions = it.allTypedefs(); checkState(typeDefinitions != null, "Type Definitions for module %s cannot be NULL.", module.getName()); for (final TypeDefinition<?> typedef : typeDefinitions) { if (typedef != null) { final Type type = typeProvider.generatedTypeForExtendedDefinitionType(typedef, typedef); if (type != null) { context.addTypedefType(typedef, type); context.addTypeToSchema(type,typedef); } } } }