Enum StandardSyntaxTag

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

    public enum StandardSyntaxTag
    extends java.lang.Enum<StandardSyntaxTag>
    implements SyntaxTag
    A somewhat language-agnostic set of user-sensible syntactic categories, suitable for conventional imperative languages, and is being developed incrementally.

    The need for alternative sets of tags is likely to arise, perhaps for other families of languages (for example for mostly expression-oriented languages) or even for specific languages.

    Disclaimer: experimental interface under development.

    See Also:
    Probe
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ASSIGNMENT
      Marker for a variable assignment.
      CALL
      Marker for a call site.
      PERIODIC
      Marker that is attached to some arbitrary locations that appear often-enough in an AST so that a location with this tag is regularly executed.
      START_LOOP
      Marker for the start of the body of a loop.
      START_METHOD
      Marker for the start of the body of a method.
      STATEMENT
      Marker for a location where ordinary "stepping" should halt.
      THROW
      Marker for a location where a guest language exception is about to be thrown.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Criteria and example uses for the tag.
      java.lang.String getName()  
      static StandardSyntaxTag valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static StandardSyntaxTag[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.oracle.truffle.api.instrument.SyntaxTag

        name
    • Enum Constant Detail

      • ASSIGNMENT

        public static final StandardSyntaxTag ASSIGNMENT
        Marker for a variable assignment.
      • THROW

        public static final StandardSyntaxTag THROW
        Marker for a location where a guest language exception is about to be thrown.
      • STATEMENT

        public static final StandardSyntaxTag STATEMENT
        Marker for a location where ordinary "stepping" should halt.
      • START_METHOD

        public static final StandardSyntaxTag START_METHOD
        Marker for the start of the body of a method.
      • START_LOOP

        public static final StandardSyntaxTag START_LOOP
        Marker for the start of the body of a loop.
      • PERIODIC

        public static final StandardSyntaxTag PERIODIC
        Marker that is attached to some arbitrary locations that appear often-enough in an AST so that a location with this tag is regularly executed. Could be the start of method and loop bodies. May be used to implement some kind of safepoint functionality.
    • Method Detail

      • values

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

        public static StandardSyntaxTag 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
      • getName

        public java.lang.String getName()
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: SyntaxTag
        Criteria and example uses for the tag.
        Specified by:
        getDescription in interface SyntaxTag