public String toString() {
   return getClass().getName()
       + "[name="
       + componentDescription.getComponentName()
       + " class="
       + componentDescription.getComponentClassName()
       + "]";
 }
예제 #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);
   }
 }
 /**
  * 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);
 }
예제 #4
0
 @Override
 public int hashCode() {
   int result = viewClassName != null ? viewClassName.hashCode() : 0;
   result = 31 * result + (componentDescription != null ? componentDescription.hashCode() : 0);
   return result;
 }
 /**
  * Get the module name.
  *
  * @return the module name
  */
 public String getModuleName() {
   return componentDescription.getModuleName();
 }
 /**
  * Get the application name.
  *
  * @return the application name
  */
 public String getApplicationName() {
   return componentDescription.getApplicationName();
 }
 /**
  * Get the component name.
  *
  * @return the component name
  */
 public String getComponentName() {
   return componentDescription.getComponentName();
 }