Annotation Interface GenAsEnumeratedType
EnumeratedType. An
EnumeratedType represents a list of valid values, much like an enum,
for which the values can be localized. The annotated class will automatically extend
EnumeratedType and, therefore, get most of the associated boiler-plate logic, but
any static final constants for referring to names must be hand-coded, as must the
rbInfo file.
The following example -- stolen from the customizer's guide -- illustrates the relationship
between the class, the class's static final constants, and the rbInfo
file.
ComputerType.java
package com.ptc.example;
import com.ptc.windchill.annotations.metadata.GenAsEnumeratedType;
@GenAsEnumeratedType
public class ComputerType extends _ComputerType {
public static final ComputerType DESKTOP = toComputerType("desktop");
public static final ComputerType LAPTOP = toComputerType("laptop");
public static final ComputerType SERVER = toComputerType("server");
}
ComputerTypeRB.rbInfo
ResourceInfo.class=wt.tools.resource.EnumResourceInfo desktop.value=Desktop desktop.order=10 laptop.value=Laptop laptop.order=20 laptop.defaultValue=true server.value=Server server.order=30
Supported API: true
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass[]The interfaces this class/interface extends/implements.The parent class for thisEnumeratedType.The supported nature of this enumerated type.
-
Element Details
-
superClass
Class superClassThe parent class for thisEnumeratedType. This class would normally be the class designated by theextendsstatement and is needed because the annotated class must extend "_"+classname" (for examplepublic MyClass extends _MyClass).Note: the parent must extend or equal
EnumeratedType, if left as the default (Object.class,EnumeratedTypeis assumed.Rose conversion note: Corresponds to Class Specification -> General -> Specialize Class (where the specialized class is the single (non-interface) parent class).
Supported API: true
- Default:
java.lang.Object.class
-
interfaces
Class[] interfacesThe interfaces this class/interface extends/implements. These interfaces would normally be present in theextendsclause (for an interface) or theimplementsclause (for a class), but must, instead, be present in this property because of the manner in whichJavatreatsstatic finalfields.Rose conversion note: Corresponds to Class Specification -> Relations -> Specialize Class (where the specialized class is the single (non-interface) parent class).
Supported API: true
- Default:
{}
-
supportedAPI
SupportedAPI supportedAPIThe supported nature of this enumerated type.Supported API: true
- Default:
PRIVATE
-