Ejemplo n.º 1
0
 public String toString() {
   return getClass().getName()
       + "[name="
       + componentDescription.getComponentName()
       + " class="
       + componentDescription.getComponentClassName()
       + "]";
 }
Ejemplo n.º 2
0
 /**
  * Get the service name for this view.
  *
  * @return the service name
  */
 public ServiceName getServiceName() {
   // TODO: need to set viewNameParts somewhere
   if (!viewNameParts.isEmpty()) {
     return componentDescription
         .getServiceName()
         .append("VIEW")
         .append(viewNameParts.toArray(new String[viewNameParts.size()]));
   } else {
     return componentDescription.getServiceName().append("VIEW").append(viewClassName);
   }
 }
Ejemplo n.º 3
0
 /**
  * Add a component to this module.
  *
  * @param description the component description
  */
 public void addComponent(ComponentDescription description) {
   final String componentName = description.getComponentName();
   final String componentClassName = description.getComponentClassName();
   if (componentName == null) {
     throw MESSAGES.nullVar("componentName");
   }
   if (componentClassName == null) {
     throw MESSAGES.nullVar("componentClassName");
   }
   if (componentsByName.containsKey(componentName)) {
     throw MESSAGES.componentAlreadyDefined(componentName);
   }
   componentsByName.put(componentName, description);
   List<ComponentDescription> list = componentsByClassName.get(componentClassName);
   if (list == null) {
     componentsByClassName.put(componentClassName, list = new ArrayList<ComponentDescription>(1));
   }
   list.add(description);
 }
Ejemplo n.º 4
0
 @Override
 public int hashCode() {
   int result = viewClassName != null ? viewClassName.hashCode() : 0;
   result = 31 * result + (componentDescription != null ? componentDescription.hashCode() : 0);
   return result;
 }
Ejemplo n.º 5
0
 /**
  * Get the module name.
  *
  * @return the module name
  */
 public String getModuleName() {
   return componentDescription.getModuleName();
 }
Ejemplo n.º 6
0
 /**
  * Get the application name.
  *
  * @return the application name
  */
 public String getApplicationName() {
   return componentDescription.getApplicationName();
 }
Ejemplo n.º 7
0
 /**
  * Get the component name.
  *
  * @return the component name
  */
 public String getComponentName() {
   return componentDescription.getComponentName();
 }