Package cs1302.tracer.model
Enum Class TypeStyle
- All Implemented Interfaces:
Serializable,Comparable<TypeStyle>,Constable
Represents the type qualification style used when rendering types in stack frames,
object labels, and variable attributes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionFormats the given type name according to this type style.static StringSimplifies a fully qualified or parameterized type string by stripping package prefixes.toString()Gets the string representation of this TypeStyle.static TypeStyleReturns the enum constant of this class with the specified name.static TypeStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FQN
Fully qualified type names (e.g.,java.lang.String,pkg.Pair<java.lang.String, java.lang.Integer>). -
SIMPLE
Simplified type names without package prefixes (e.g.,String,Pair<String, Integer>).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
format
Formats the given type name according to this type style.- Parameters:
typeName- The raw type name string (may be fully qualified or generic).- Returns:
- The formatted type name string, or null if input is null.
-
simplify
Simplifies a fully qualified or parameterized type string by stripping package prefixes.- Parameters:
typeName- The type string to simplify.- Returns:
- The simplified type string.
-
toString
Gets the string representation of this TypeStyle.
-