Package Torello.Browser.JsonAST
Enum WhichTCE
- java.lang.Object
-
- java.lang.Enum<WhichTCE>
-
- Torello.Browser.JsonAST.WhichTCE
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<WhichTCE>
public enum WhichTCE extends java.lang.Enum<WhichTCE>
This'enum'is used to identify of what kind ofTCEinstance'this'is. ATCEmay represet a Chrome Dev-Tools ProtocolType,CommandorEvent.
An Enumerated Constant Design Pattern was chosen of building actual subclasses ofTCEsince such a sub-class"Type"or"Command"would not have been able to add any methods or fields to the sub-class. Instead, classTCEsimply 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/WhichTCE.java
- Open New Browser-Tab: Torello/Browser/JsonAST/WhichTCE.java
File Size: 1,615 Bytes Line Count: 39 '\n' Characters Found
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CommandThis constant may be used to indicate that'this'TCEinstance represents a 'Command'.EventThis constant may be used to indicate that'this'TCEinstance represents a 'Type'.TypeThis constant may be used to indicate that'this'TCEinstance represents a 'Type'.
-
Method Summary
Convert String to Enum Constant Modifier and Type Method Description static WhichTCEvalueOf(String name)Returns the enum constant of this type with the specified name.List all Enum Constants Modifier and Type Method Description static WhichTCE[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Type
-
Command
-
Event
public static final WhichTCE Event
This constant may be used to indicate that'this'TCEinstance represents a 'Type'. Type-TCE'sare converted into Static Nested-Classes which inherit theBrowserEventinterface in this Java implementation of the Chrome Dev-Tools Protocol.
-
-
Method Detail
-
values
public static WhichTCE[] 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 (WhichTCE c : WhichTCE.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WhichTCE 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
-
-