/** * Return a directive suitable for publication as an external description. * * @param module the enclosing module * @return the resource directive */ ResourceDirective exportResource(final DefaultModule module) { if (null == m_directive) { final String error = "Cannot export from the root module."; throw new UnsupportedOperationException(error); } String name = getName(); String version = getVersion(); String basedir = null; InfoDirective info = m_directive.getInfoDirective(); TypeDirective[] types = m_directive.getTypeDirectives(); TypeDirective[] exportedTypes = createExportedTypes(types); DependencyDirective[] dependencies = createDeps(module); Properties properties = getExportProperties(); return ResourceDirective.createResourceDirective( name, version, Classifier.EXTERNAL, basedir, info, exportedTypes, dependencies, properties, null, true); }
/** * Return the info block. * * @return the info block */ public Info getInfo() { return m_directive.getInfoDirective(); }