code: public JavaClassSource create(ClassIndex index, ClassPlan plan) {
          this.names.clear();
  
          // base class
          JavaClassSource type = Roaster.parse(
                  JavaClassSource.class,
                  "public class " + plan.getClassName() + "<T extends " + plan.getClassName() + "<T>> implements " + Keyed.class.getName() + "{}"
          );
  
  
          type.setPackage(plan.getPackageName());
  
          type.addImport(AttributeDocumentation.class);
          type.addImport(ResourceDocumentation.class);
          type.addImport(SingletonResource.class);
  
          JavaDocSource javaDoc = type.getJavaDoc();
          ResourceDescription desc = plan.getDescription();
          javaDoc.setText(desc.getText());
  
          addAddressAnnotations(type, plan);
          addConstructor(type, plan);
          addResourceTypeAnnotation(type, plan);
          addPropertyChangeSupport(type, plan);
  
          addChildResources(index, type, plan);
          addSingletonResources(index, type, plan);
  
          if (plan.getSubresourceClass() != null) {
              type.addNestedType(plan.getSubresourceClass());
          }
  
          for (EnumPlan enumPlan : plan.getEnumPlans()) {
              EnumFactory factory = new EnumFactory();
              JavaEnumSource enumType = factory.create(index, enumPlan);
              enumType.setStatic(true);
              type.addNestedType(enumType);
          }
  
          addAttribtues(index, type, plan);
  
          return type;
      }
docs: Base template for a resource representation.
  Covers the resource attributes
  
  @param index
  @param plan
  @return