Package spoon.reflect.path
Enum CtRole
- All Implemented Interfaces:
Serializable
,Comparable<CtRole>
Identifies the roles of attributes of spoon model.
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic CtRole
Get theCtRole
associated to the field nameGet the camel case representation of the namegetMatchingSubRoleFor(CtElement item)
toString()
static CtRole
Returns the enum constant of this type with the specified name.static CtRole[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NAME
-
TYPE
-
MULTI_TYPE
-
DECLARING_TYPE
-
DECLARED_TYPE
-
DECLARED_TYPE_REF
-
DECLARED_MODULE
-
DECLARED_MODULE_REF
-
PACKAGE_DECLARATION
-
DECLARED_IMPORT
-
CONTAINED_TYPE
-
BODY
-
IS_SHADOW
-
BOUND
-
BOUNDING_TYPE
-
IS_FINAL
-
IS_STATIC
-
IS_UPPER
-
IS_IMPLICIT
-
IS_DEFAULT
-
IS_VARARGS
-
DEFAULT_EXPRESSION
-
THEN
-
ELSE
-
PACKAGE_REF
-
SUB_PACKAGE
-
CONDITION
-
RIGHT_OPERAND
-
LEFT_OPERAND
-
LABEL
-
CASE
-
OPERATOR_KIND
-
PARAMETER
-
ARGUMENT_TYPE
-
EXPRESSION
-
TARGET
-
VARIABLE
-
FINALIZER
-
THROWN
-
ASSIGNMENT
-
ASSIGNED
-
MODIFIER
-
EMODIFIER
-
COMMENT
-
ANNOTATION_TYPE
-
INTERFACE
-
ANNOTATION
-
STATEMENT
-
ARGUMENT
-
SUPER_TYPE
-
TYPE_MEMBER
-
NESTED_TYPE
-
CONSTRUCTOR
-
METHOD
-
ANNONYMOUS_EXECUTABLE
-
FIELD
-
EXECUTABLE_REF
-
CAST
-
VALUE
-
FOR_UPDATE
-
FOR_INIT
-
FOREACH_VARIABLE
-
TRY_RESOURCE
-
DIMENSION
-
CATCH
-
TARGET_LABEL
-
TYPE_PARAMETER
-
TYPE_ARGUMENT
-
COMMENT_TAG
-
COMMENT_CONTENT
-
COMMENT_TYPE
-
DOCUMENTATION_TYPE
-
DOCUMENTATION_TYPE_REALNAME
-
JAVADOC_TAG_VALUE
-
POSITION
-
SNIPPET
-
ACCESSED_TYPE
-
IMPORT_REFERENCE
-
MODULE_DIRECTIVE
-
REQUIRED_MODULE
-
MODULE_REF
-
EXPORTED_PACKAGE
-
OPENED_PACKAGE
-
SERVICE_TYPE
-
IMPLEMENTATION_TYPE
-
PROVIDED_SERVICE
-
IS_INFERRED
-
TYPE_REF
-
LITERAL_BASE
-
CASE_KIND
-
RECORD_COMPONENT
-
COMPACT_CONSTRUCTOR
-
PERMITTED_TYPE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
fromName
Get theCtRole
associated to the field name- Parameters:
name
-- Returns:
-
getCamelCaseName
Get the camel case representation of the name- Returns:
- the name in camel case
-
toString
-
getSuperRole
- Returns:
- the CtRole which is the real holder of this virtual CtRole or null if there is no super role.
For example
TYPE_MEMBER
is super role ofCONSTRUCTOR
,FIELD
,METHOD
,NESTED_TYPE
-
getSubRoles
- Returns:
- sub roles of this super role or empty array if there is no sub role.
For example
TYPE_MEMBER
is super role ofCONSTRUCTOR
,FIELD
,METHOD
,NESTED_TYPE
-
getMatchingSubRoleFor
- Returns:
- sub role of this role, which match `item`.
CtMethod method = ... CtRole role = CtRole.TYPE_MEMBER.getMatchingSubRoleFor(method);
-