Package Torello.Browser.JsonAST
Enum WhichPPR
- java.lang.Object
-
- java.lang.Enum<WhichPPR>
-
- Torello.Browser.JsonAST.WhichPPR
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<WhichPPR>
public enum WhichPPR extends java.lang.Enum<WhichPPR>
Each insance ofPPRthat is created has an instance of thisenumas a constantfinalfield. The only purpose of thisenumis to delineate what which kind ofPPRan instance is.
An Enumerated Constant Design Pattern was chosen of building actual subclasses ofPPRsince such a sub-class"Parameter"or"Property"would not have been able to add any methods or fields to the sub-class. Instead, classPPRsimply contains one of these three constants among its constant fields list to identify what kind of instance it belongs to.
Hi-Lited Source-Code:- View Here: Torello/Browser/JsonAST/WhichPPR.java
- Open New Browser-Tab: Torello/Browser/JsonAST/WhichPPR.java
File Size: 1,319 Bytes Line Count: 33 '\n' Characters Found
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ParameterAnenumconstant which Signifies aPPR-Instance is a Method ParameterPropertyAnenumconstant which Signifies aPPR-Instance is a Class Field, a.k.a.ReturnAnenumconstant which Signifies aPPR-Instance is a Method Return Type
-
Field Summary
Fields Modifier and Type Field Description StringpropNameTheJsonObjectproperty name which stores objects of the named kind / type.
-
Method Summary
Convert String to Enum Constant Modifier and Type Method Description static WhichPPRvalueOf(String name)Returns the enum constant of this type with the specified name.List all Enum Constants Modifier and Type Method Description static WhichPPR[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Field Detail
-
propName
public final java.lang.String propName
TheJsonObjectproperty name which stores objects of the named kind / type.- Code:
- Exact Field Declaration Expression:
public final String propName;
-
-
Method Detail
-
values
public static WhichPPR[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (WhichPPR c : WhichPPR.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WhichPPR valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-