001package Torello.Browser.JsonAST; 002 003/** 004 * Each insance of {@link PPR} that is created has an instance of this {@code enum} as a constant 005 * {@code final} field. The only purpose of this {@code enum} is to delineate what which kind of 006 * {@code PPR} an instance is. 007 * 008 * <BR /><BR />An Enumerated Constant Design Pattern was chosen of building actual subclasses of 009 * {@code PPR} since such a sub-class {@code "Parameter"} or {@code "Property"} would not have been 010 * able to add any methods or fields to the sub-class. Instead, class {@code PPR} simply contains 011 * one of these three constants among its constant fields list to identify what kind of instance 012 * it belongs to. 013 */ 014public enum WhichPPR 015{ 016 /** 017 * An {@code enum} constant which Signifies a {@link PPR}-Instance is a Class Field, a.k.a. 018 * "Property" 019 */ 020 Property("properties"), 021 022 /** An {@code enum} constant which Signifies a {@link PPR}-Instance is a Method Parameter */ 023 Parameter("parameters"), 024 025 /** An {@code enum} constant which Signifies a {@link PPR}-Instance is a Method Return Type */ 026 Return("returns"); 027 028 /** The {@code JsonObject} property name which stores objects of the named kind / type. */ 029 public final String propName; 030 031 WhichPPR(final String propName) 032 { this.propName = propName; } 033}