1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package Torello.Browser.JsonAST;

/**
 * Each insance of {@link PPR} that is created has an instance of this {@code enum} as a constant
 * {@code final} field.  The only purpose of this {@code enum} is to delineate what which kind of
 * {@code PPR} an instance is.
 * 
 * <BR /><BR />An Enumerated Constant Design Pattern was chosen of building actual subclasses of 
 * {@code PPR} since such a sub-class {@code "Parameter"} or {@code "Property"} would not have been
 * able to add any methods or fields to the sub-class.  Instead, class {@code PPR} simply contains
 * one of these three constants among its constant fields list to identify what kind of instance
 * it belongs to.
 */
public enum WhichPPR
{
    /**
     * An {@code enum} constant which Signifies a {@link PPR}-Instance is a Class Field, a.k.a.
     * "Property"
     */
    Property("properties"),

    /** An {@code enum} constant which Signifies a {@link PPR}-Instance is a Method Parameter */
    Parameter("parameters"),

    /** An {@code enum} constant which Signifies a {@link PPR}-Instance is a Method Return Type */
    Return("returns");

    /** The {@code JsonObject} property name which stores objects of the named kind / type. */
    public final String propName;

    WhichPPR(final String propName)
    { this.propName = propName; }
}