Enum CtRole

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CtRole>

    public enum CtRole
    extends java.lang.Enum<CtRole>
    Identifies the roles of attributes of spoon model.
    • Enum Constant Detail

      • NAME

        public static final CtRole NAME
      • TYPE

        public static final CtRole TYPE
      • MULTI_TYPE

        public static final CtRole MULTI_TYPE
      • DECLARING_TYPE

        public static final CtRole DECLARING_TYPE
      • DECLARED_TYPE

        public static final CtRole DECLARED_TYPE
      • DECLARED_TYPE_REF

        public static final CtRole DECLARED_TYPE_REF
      • DECLARED_MODULE

        public static final CtRole DECLARED_MODULE
      • DECLARED_MODULE_REF

        public static final CtRole DECLARED_MODULE_REF
      • PACKAGE_DECLARATION

        public static final CtRole PACKAGE_DECLARATION
      • DECLARED_IMPORT

        public static final CtRole DECLARED_IMPORT
      • CONTAINED_TYPE

        public static final CtRole CONTAINED_TYPE
      • BODY

        public static final CtRole BODY
      • IS_SHADOW

        public static final CtRole IS_SHADOW
      • BOUND

        public static final CtRole BOUND
      • BOUNDING_TYPE

        public static final CtRole BOUNDING_TYPE
      • IS_FINAL

        public static final CtRole IS_FINAL
      • IS_STATIC

        public static final CtRole IS_STATIC
      • IS_UPPER

        public static final CtRole IS_UPPER
      • IS_IMPLICIT

        public static final CtRole IS_IMPLICIT
      • IS_DEFAULT

        public static final CtRole IS_DEFAULT
      • IS_VARARGS

        public static final CtRole IS_VARARGS
      • DEFAULT_EXPRESSION

        public static final CtRole DEFAULT_EXPRESSION
      • THEN

        public static final CtRole THEN
      • ELSE

        public static final CtRole ELSE
      • PACKAGE_REF

        public static final CtRole PACKAGE_REF
      • SUB_PACKAGE

        public static final CtRole SUB_PACKAGE
      • CONDITION

        public static final CtRole CONDITION
      • RIGHT_OPERAND

        public static final CtRole RIGHT_OPERAND
      • LEFT_OPERAND

        public static final CtRole LEFT_OPERAND
      • LABEL

        public static final CtRole LABEL
      • CASE

        public static final CtRole CASE
      • OPERATOR_KIND

        public static final CtRole OPERATOR_KIND
      • PARAMETER

        public static final CtRole PARAMETER
      • ARGUMENT_TYPE

        public static final CtRole ARGUMENT_TYPE
      • EXPRESSION

        public static final CtRole EXPRESSION
      • TARGET

        public static final CtRole TARGET
      • VARIABLE

        public static final CtRole VARIABLE
      • FINALIZER

        public static final CtRole FINALIZER
      • THROWN

        public static final CtRole THROWN
      • ASSIGNMENT

        public static final CtRole ASSIGNMENT
      • ASSIGNED

        public static final CtRole ASSIGNED
      • MODIFIER

        public static final CtRole MODIFIER
      • EMODIFIER

        public static final CtRole EMODIFIER
      • COMMENT

        public static final CtRole COMMENT
      • ANNOTATION_TYPE

        public static final CtRole ANNOTATION_TYPE
      • INTERFACE

        public static final CtRole INTERFACE
      • ANNOTATION

        public static final CtRole ANNOTATION
      • STATEMENT

        public static final CtRole STATEMENT
      • ARGUMENT

        public static final CtRole ARGUMENT
      • SUPER_TYPE

        public static final CtRole SUPER_TYPE
      • TYPE_MEMBER

        public static final CtRole TYPE_MEMBER
      • NESTED_TYPE

        public static final CtRole NESTED_TYPE
      • CONSTRUCTOR

        public static final CtRole CONSTRUCTOR
      • METHOD

        public static final CtRole METHOD
      • ANNONYMOUS_EXECUTABLE

        public static final CtRole ANNONYMOUS_EXECUTABLE
      • FIELD

        public static final CtRole FIELD
      • EXECUTABLE_REF

        public static final CtRole EXECUTABLE_REF
      • CAST

        public static final CtRole CAST
      • VALUE

        public static final CtRole VALUE
      • FOR_UPDATE

        public static final CtRole FOR_UPDATE
      • FOR_INIT

        public static final CtRole FOR_INIT
      • FOREACH_VARIABLE

        public static final CtRole FOREACH_VARIABLE
      • TRY_RESOURCE

        public static final CtRole TRY_RESOURCE
      • DIMENSION

        public static final CtRole DIMENSION
      • CATCH

        public static final CtRole CATCH
      • TARGET_LABEL

        public static final CtRole TARGET_LABEL
      • TYPE_PARAMETER

        public static final CtRole TYPE_PARAMETER
      • TYPE_ARGUMENT

        public static final CtRole TYPE_ARGUMENT
      • COMMENT_TAG

        public static final CtRole COMMENT_TAG
      • COMMENT_CONTENT

        public static final CtRole COMMENT_CONTENT
      • COMMENT_TYPE

        public static final CtRole COMMENT_TYPE
      • DOCUMENTATION_TYPE

        public static final CtRole DOCUMENTATION_TYPE
      • DOCUMENTATION_TYPE_REALNAME

        public static final CtRole DOCUMENTATION_TYPE_REALNAME
      • JAVADOC_TAG_VALUE

        public static final CtRole JAVADOC_TAG_VALUE
      • POSITION

        public static final CtRole POSITION
      • SNIPPET

        public static final CtRole SNIPPET
      • ACCESSED_TYPE

        public static final CtRole ACCESSED_TYPE
      • IMPORT_REFERENCE

        public static final CtRole IMPORT_REFERENCE
      • MODULE_DIRECTIVE

        public static final CtRole MODULE_DIRECTIVE
      • REQUIRED_MODULE

        public static final CtRole REQUIRED_MODULE
      • MODULE_REF

        public static final CtRole MODULE_REF
      • EXPORTED_PACKAGE

        public static final CtRole EXPORTED_PACKAGE
      • OPENED_PACKAGE

        public static final CtRole OPENED_PACKAGE
      • SERVICE_TYPE

        public static final CtRole SERVICE_TYPE
      • IMPLEMENTATION_TYPE

        public static final CtRole IMPLEMENTATION_TYPE
      • PROVIDED_SERVICE

        public static final CtRole PROVIDED_SERVICE
      • IS_INFERRED

        public static final CtRole IS_INFERRED
      • TYPE_REF

        public static final CtRole TYPE_REF
      • LITERAL_BASE

        public static final CtRole LITERAL_BASE
      • CASE_KIND

        public static final CtRole CASE_KIND
      • RECORD_COMPONENT

        public static final CtRole RECORD_COMPONENT
      • COMPACT_CONSTRUCTOR

        public static final CtRole COMPACT_CONSTRUCTOR
    • Method Detail

      • values

        public static CtRole[] 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 (CtRole c : CtRole.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CtRole 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 name
        java.lang.NullPointerException - if the argument is null
      • fromName

        public static CtRole fromName​(java.lang.String name)
        Get the CtRole associated to the field name
        Parameters:
        name -
        Returns:
      • getCamelCaseName

        public java.lang.String getCamelCaseName()
        Get the camel case representation of the name
        Returns:
        the name in camel case
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<CtRole>
      • getMatchingSubRoleFor

        public CtRole getMatchingSubRoleFor​(CtElement item)
        Returns:
        sub role of this role, which match `item`.
        
         CtMethod method = ...
         CtRole role = CtRole.TYPE_MEMBER.getMatchingSubRoleFor(method);