org.apache.hivemind.parse
Class ModuleDescriptor

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.hivemind.parse.BaseAnnotationHolder
          extended by org.apache.hivemind.parse.ModuleDescriptor
All Implemented Interfaces:
Locatable, LocationHolder, AnnotationHolder

public final class ModuleDescriptor
extends BaseAnnotationHolder

Representation of a HiveMind module descriptor, as parsed by DescriptorParser. Corresponds to the root <module> element.

Author:
Howard Lewis Ship

Constructor Summary
ModuleDescriptor(ClassResolver resolver, ErrorHandler errorHandler)
           
 
Method Summary
 void addConfigurationPoint(ConfigurationPointDescriptor descriptor)
           
 void addContribution(ContributionDescriptor descriptor)
           
 void addDependency(DependencyDescriptor dependency)
           
 void addImplementation(ImplementationDescriptor descriptor)
           
 void addSchema(SchemaImpl schema)
          Adds a schema to this module descriptor.
 void addServicePoint(ServicePointDescriptor service)
           
 void addSubModule(SubModuleDescriptor subModule)
           
 ClassResolver getClassResolver()
           
 java.util.List getConfigurationPoints()
           
 java.util.List getContributions()
           
 java.util.List getDependencies()
           
 java.util.List getImplementations()
           
 java.lang.String getModuleId()
           
 java.lang.String getPackageName()
          Returns the name of the package to search for class names within.
 Schema getSchema(java.lang.String id)
           
 java.util.Collection getSchemas()
          Returns a Collection of SchemaImpl.
 java.util.List getServicePoints()
           
 java.util.List getSubModules()
           
 java.lang.String getVersion()
           
 void setModuleId(java.lang.String string)
           
 void setPackageName(java.lang.String packageName)
           
 void setVersion(java.lang.String string)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.hivemind.parse.BaseAnnotationHolder
getAnnotation, setAnnotation
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleDescriptor

public ModuleDescriptor(ClassResolver resolver,
                        ErrorHandler errorHandler)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addServicePoint

public void addServicePoint(ServicePointDescriptor service)

getServicePoints

public java.util.List getServicePoints()

addImplementation

public void addImplementation(ImplementationDescriptor descriptor)

getImplementations

public java.util.List getImplementations()

addConfigurationPoint

public void addConfigurationPoint(ConfigurationPointDescriptor descriptor)

getConfigurationPoints

public java.util.List getConfigurationPoints()

addContribution

public void addContribution(ContributionDescriptor descriptor)

getContributions

public java.util.List getContributions()

addSubModule

public void addSubModule(SubModuleDescriptor subModule)

getSubModules

public java.util.List getSubModules()

addDependency

public void addDependency(DependencyDescriptor dependency)

getDependencies

public java.util.List getDependencies()

addSchema

public void addSchema(SchemaImpl schema)
Adds a schema to this module descriptor. If a schema with the same id already has been added, an error is reported and the given schema is ignored.

Since:
1.1

getSchema

public Schema getSchema(java.lang.String id)
Since:
1.1

getSchemas

public java.util.Collection getSchemas()
Returns a Collection of SchemaImpl.

Since:
1.1

getModuleId

public java.lang.String getModuleId()

getVersion

public java.lang.String getVersion()

setModuleId

public void setModuleId(java.lang.String string)

setVersion

public void setVersion(java.lang.String string)

getClassResolver

public ClassResolver getClassResolver()

getPackageName

public java.lang.String getPackageName()
Returns the name of the package to search for class names within. By default, the package name will match the module id, but this can be overridden in the module descriptor.

Since:
1.1

setPackageName

public void setPackageName(java.lang.String packageName)
Since:
1.1