Groovy 1.7.0

## org.codehaus.groovy.syntax
Class Types

    java.lang.Object
      org.codehaus.groovy.syntax.Types

    class Types
    extends Object

Typing information for the CST system. The types here are those used by CSTNode, Token, and Reduction.

author:
  bob mcwhirter

author:
  Chris Poirier

version:
  $Id: Types.java 18016 2009-10-16 06:07:55Z user57 $

Field Summary
`static int` | `ANY`
`static int` | `ANY_END_OF_STATEMENT`
`static int` | `ARRAY_EXPRESSION`
`static int` | `ARRAY_ITEM_TERMINATORS`
`static int` | `ASSIGN`
`static int` | `ASSIGNMENT_OPERATOR`
`static int` | `BITWISE_AND`
`static int` | `BITWISE_AND_EQUAL`
`static int` | `BITWISE_NEGATION`
`static int` | `BITWISE_OPERATOR`
`static int` | `BITWISE_OR`
`static int` | `BITWISE_OR_EQUAL`
`static int` | `BITWISE_XOR`
`static int` | `BITWISE_XOR_EQUAL`
`static int` | `COLON`
`static int` | `COMMA`
`static int` | `COMPARE_EQUAL`
`static int` | `COMPARE_GREATER_THAN`
`static int` | `COMPARE_GREATER_THAN_EQUAL`
`static int` | `COMPARE_IDENTICAL`
`static int` | `COMPARE_LESS_THAN`
`static int` | `COMPARE_LESS_THAN_EQUAL`
`static int` | `COMPARE_NOT_EQUAL`
`static int` | `COMPARE_NOT_IDENTICAL`
`static int` | `COMPARE_TO`
`static int` | `COMPARISON_OPERATOR`
`static int` | `COMPLEX_EXPRESSION`
`static int` | `CREATABLE_PRIMITIVE_TYPE`
`static int` | `CREATABLE_TYPE_NAME`
`static int` | `DECIMAL_NUMBER`
`static int` | `DECLARATION_MODIFIER`
`static int` | `DEREFERENCE_OPERATOR`
`static int` | `DIVIDE`
`static int` | `DIVIDE_EQUAL`
`static int` | `DOT`
`static int` | `DOT_DOT`
`static int` | `DOT_DOT_DOT`
`static int` | `DOUBLE_PIPE`
`static int` | `EOF`
`static int` | `EQUAL`
`static int` | `EQUALS`
`static int` | `EXPRESSION`
`static int` | `FIND_REGEX`
`static int` | `GENERAL_END_OF_STATEMENT`
`static int` | `GSTRING_END`
`static int` | `GSTRING_EXPRESSION_END`
`static int` | `GSTRING_EXPRESSION_START`
`static int` | `GSTRING_START`
`static int` | `IDENTIFIER`
`static int` | `INFIX_OPERATOR`
`static int` | `INTDIV`
`static int` | `INTDIV_EQUAL`
`static int` | `INTEGER_NUMBER`
`static int` | `KEYWORD`
`static int` | `KEYWORD_ABSTRACT`
`static int` | `KEYWORD_AS`
`static int` | `KEYWORD_ASSERT`
`static int` | `KEYWORD_BOOLEAN`
`static int` | `KEYWORD_BREAK`
`static int` | `KEYWORD_BYTE`
`static int` | `KEYWORD_CASE`
`static int` | `KEYWORD_CATCH`
`static int` | `KEYWORD_CHAR`
`static int` | `KEYWORD_CLASS`
`static int` | `KEYWORD_CONST`
`static int` | `KEYWORD_CONTINUE`
`static int` | `KEYWORD_DEF`
`static int` | `KEYWORD_DEFAULT`
`static int` | `KEYWORD_DEFMACRO`
`static int` | `KEYWORD_DO`
`static int` | `KEYWORD_DOUBLE`
`static int` | `KEYWORD_ELSE`
`static int` | `KEYWORD_EXPRESSION`
`static int` | `KEYWORD_EXTENDS`
`static int` | `KEYWORD_FALSE`
`static int` | `KEYWORD_FINAL`
`static int` | `KEYWORD_FINALLY`
`static int` | `KEYWORD_FLOAT`
`static int` | `KEYWORD_FOR`
`static int` | `KEYWORD_GOTO`
`static int` | `KEYWORD_IDENTIFIER`
`static int` | `KEYWORD_IF`
`static int` | `KEYWORD_IMPLEMENTS`
`static int` | `KEYWORD_IMPORT`
`static int` | `KEYWORD_IN`
`static int` | `KEYWORD_INSTANCEOF`
`static int` | `KEYWORD_INT`
`static int` | `KEYWORD_INTERFACE`
`static int` | `KEYWORD_LONG`
`static int` | `KEYWORD_MIXIN`
`static int` | `KEYWORD_NATIVE`
`static int` | `KEYWORD_NEW`
`static int` | `KEYWORD_NULL`
`static int` | `KEYWORD_PACKAGE`
`static int` | `KEYWORD_PRIVATE`
`static int` | `KEYWORD_PROPERTY`
`static int` | `KEYWORD_PROTECTED`
`static int` | `KEYWORD_PUBLIC`
`static int` | `KEYWORD_RETURN`
`static int` | `KEYWORD_SHORT`
`static int` | `KEYWORD_STATIC`
`static int` | `KEYWORD_SUPER`
`static int` | `KEYWORD_SWITCH`
`static int` | `KEYWORD_SYNCHRONIZED`
`static int` | `KEYWORD_THIS`
`static int` | `KEYWORD_THROW`
`static int` | `KEYWORD_THROWS`
`static int` | `KEYWORD_TRANSIENT`
`static int` | `KEYWORD_TRUE`
`static int` | `KEYWORD_TRY`
`static int` | `KEYWORD_VOID`
`static int` | `KEYWORD_VOLATILE`
`static int` | `KEYWORD_WHILE`
`static int` | `LEFT_CURLY_BRACE`
`static int` | `LEFT_OF_MATCHED_CONTAINER`
`static int` | `LEFT_PARENTHESIS`
`static int` | `LEFT_SHIFT`
`static int` | `LEFT_SHIFT_EQUAL`
`static int` | `LEFT_SQUARE_BRACKET`
`static int` | `LITERAL`
`static int` | `LITERAL_EXPRESSION`
`static int` | `LOGICAL_AND`
`static int` | `LOGICAL_AND_EQUAL`
`static int` | `LOGICAL_OPERATOR`
`static int` | `LOGICAL_OR`
`static int` | `LOGICAL_OR_EQUAL`
`static int` | `LOOP`
`static int` | `MATCHED_CONTAINER`
`static int` | `MATCH_REGEX`
`static int` | `MATH_OPERATOR`
`static int` | `METHOD_CALL_STARTERS`
`static int` | `MINUS`
`static int` | `MINUS_EQUAL`
`static int` | `MINUS_MINUS`
`static int` | `MOD`
`static int` | `MOD_EQUAL`
`static int` | `MULTIPLY`
`static int` | `MULTIPLY_EQUAL`
`static int` | `NAMED_VALUE`
`static int` | `NAVIGATE`
`static int` | `NEWLINE`
`static int` | `NOT`
`static int` | `NOT_EOF`
`static int` | `NUMBER`
`static int` | `OPERATOR_EXPRESSION`
`static int` | `OPTIONAL_DATATYPE_FOLLOWERS`
`static int` | `PARAMETER_TERMINATORS`
`static int` | `PIPE`
`static int` | `PLUS`
`static int` | `PLUS_EQUAL`
`static int` | `PLUS_PLUS`
`static int` | `POSTFIX_MINUS_MINUS`
`static int` | `POSTFIX_OPERATOR`
`static int` | `POSTFIX_PLUS_PLUS`
`static int` | `POWER`
`static int` | `POWER_EQUAL`
`static int` | `PRECLUDES_CAST_OPERATOR`
`static int` | `PREFIX_MINUS`
`static int` | `PREFIX_MINUS_MINUS`
`static int` | `PREFIX_OPERATOR`
`static int` | `PREFIX_OR_INFIX_OPERATOR`
`static int` | `PREFIX_PLUS`
`static int` | `PREFIX_PLUS_PLUS`
`static int` | `PRIMITIVE_TYPE`
`static int` | `PURE_PREFIX_OPERATOR`
`static int` | `QUESTION`
`static int` | `RANGE_OPERATOR`
`static int` | `REGEX_COMPARISON_OPERATOR`
`static int` | `REGEX_PATTERN`
`static int` | `RESERVED_KEYWORD`
`static int` | `RIGHT_CURLY_BRACE`
`static int` | `RIGHT_OF_MATCHED_CONTAINER`
`static int` | `RIGHT_PARENTHESIS`
`static int` | `RIGHT_SHIFT`
`static int` | `RIGHT_SHIFT_EQUAL`
`static int` | `RIGHT_SHIFT_UNSIGNED`
`static int` | `RIGHT_SHIFT_UNSIGNED_EQUAL`
`static int` | `RIGHT_SQUARE_BRACKET`
`static int` | `SEMICOLON`
`static int` | `SIGN`
`static int` | `SIMPLE_EXPRESSION`
`static int` | `STAR`
`static int` | `STAR_STAR`
`static int` | `STRING`
`static int` | `SWITCH_BLOCK_TERMINATORS`
`static int` | `SWITCH_ENTRIES`
`static int` | `SYMBOL`
`static int` | `SYNTHETIC`
`static int` | `SYNTH_BLOCK`
`static int` | `SYNTH_CAST`
`static int` | `SYNTH_CLASS`
`static int` | `SYNTH_CLOSURE`
`static int` | `SYNTH_COMPILATION_UNIT`
`static int` | `SYNTH_EXPRESSION`
`static int` | `SYNTH_GSTRING`
`static int` | `SYNTH_INTERFACE`
`static int` | `SYNTH_LABEL`
`static int` | `SYNTH_LIST`
`static int` | `SYNTH_MAP`
`static int` | `SYNTH_METHOD`
`static int` | `SYNTH_METHOD_CALL`
`static int` | `SYNTH_MIXIN`
`static int` | `SYNTH_PARAMETER_DECLARATION`
`static int` | `SYNTH_PROPERTY`
`static int` | `SYNTH_TERNARY`
`static int` | `SYNTH_TUPLE`
`static int` | `SYNTH_VARIABLE_DECLARATION`
`static int` | `TRUTH_VALUE`
`static int` | `TYPE_DECLARATION`
`static int` | `TYPE_LIST_TERMINATORS`
`static int` | `TYPE_NAME`
`static int` | `UNKNOWN`
`static int` | `UNSAFE_OVER_NEWLINES`

Constructor Summary
`Types()`

Method Summary
`static boolean` | `canMean(int actual, int preferred)` Given two types, returns true if the first can be viewed as the second.
`static String` | `getDescription(int type)` Gets the description for the specified type.
`static Collection` | `getKeywords()`
`static int` | `getPrecedence(int type, boolean throwIfInvalid)` Returns the precendence of the specified operator.
`static String` | `getText(int type)` Returns the text for the specified type.
`static boolean` | `isKeyword(String text)`
`static int` | `lookup(String text, int filter)` Returns the type for the specified symbol/keyword text.
`static int` | `lookupKeyword(String text)` Returns the type for the specified keyword text.
`static int` | `lookupSymbol(String text)` Returns the type for the specified symbol text.
`static void` | `makePostfix(CSTNode node, boolean throwIfInvalid)` Converts a node from a generic type to a specific postfix type.
`static void` | `makePrefix(CSTNode node, boolean throwIfInvalid)` Converts a node from a generic type to a specific prefix type.
`static boolean` | `ofType(int specific, int general)` Given two types, returns true if the second describes the first.

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Field Detail

### ANY

    static final int ANY

### ANY_END_OF_STATEMENT

    static final int ANY_END_OF_STATEMENT

### ARRAY_EXPRESSION

    static final int ARRAY_EXPRESSION

### ARRAY_ITEM_TERMINATORS

    static final int ARRAY_ITEM_TERMINATORS

### ASSIGN

    static final int ASSIGN

### ASSIGNMENT_OPERATOR

    static final int ASSIGNMENT_OPERATOR

### BITWISE_AND

    static final int BITWISE_AND

### BITWISE_AND_EQUAL

    static final int BITWISE_AND_EQUAL

### BITWISE_NEGATION

    static final int BITWISE_NEGATION

### BITWISE_OPERATOR

    static final int BITWISE_OPERATOR

### BITWISE_OR

    static final int BITWISE_OR

### BITWISE_OR_EQUAL

    static final int BITWISE_OR_EQUAL

### BITWISE_XOR

    static final int BITWISE_XOR

### BITWISE_XOR_EQUAL

    static final int BITWISE_XOR_EQUAL

### COLON

    static final int COLON

### COMMA

    static final int COMMA

### COMPARE_EQUAL

    static final int COMPARE_EQUAL

### COMPARE_GREATER_THAN

    static final int COMPARE_GREATER_THAN

### COMPARE_GREATER_THAN_EQUAL

    static final int COMPARE_GREATER_THAN_EQUAL

### COMPARE_IDENTICAL

    static final int COMPARE_IDENTICAL

### COMPARE_LESS_THAN

    static final int COMPARE_LESS_THAN

### COMPARE_LESS_THAN_EQUAL

    static final int COMPARE_LESS_THAN_EQUAL

### COMPARE_NOT_EQUAL

    static final int COMPARE_NOT_EQUAL

### COMPARE_NOT_IDENTICAL

    static final int COMPARE_NOT_IDENTICAL

### COMPARE_TO

    static final int COMPARE_TO

### COMPARISON_OPERATOR

    static final int COMPARISON_OPERATOR

### COMPLEX_EXPRESSION

    static final int COMPLEX_EXPRESSION

### CREATABLE_PRIMITIVE_TYPE

    static final int CREATABLE_PRIMITIVE_TYPE

### CREATABLE_TYPE_NAME

    static final int CREATABLE_TYPE_NAME

### DECIMAL_NUMBER

    static final int DECIMAL_NUMBER

### DECLARATION_MODIFIER

    static final int DECLARATION_MODIFIER

### DEREFERENCE_OPERATOR

    static final int DEREFERENCE_OPERATOR

### DIVIDE

    static final int DIVIDE

### DIVIDE_EQUAL

    static final int DIVIDE_EQUAL

### DOT

    static final int DOT

### DOT_DOT

    static final int DOT_DOT

### DOT_DOT_DOT

    static final int DOT_DOT_DOT

### DOUBLE_PIPE

    static final int DOUBLE_PIPE

### EOF

    static final int EOF

### EQUAL

    static final int EQUAL

### EQUALS

    static final int EQUALS

### EXPRESSION

    static final int EXPRESSION

### FIND_REGEX

    static final int FIND_REGEX

### GENERAL_END_OF_STATEMENT

    static final int GENERAL_END_OF_STATEMENT

### GSTRING_END

    static final int GSTRING_END

### GSTRING_EXPRESSION_END

    static final int GSTRING_EXPRESSION_END

### GSTRING_EXPRESSION_START

    static final int GSTRING_EXPRESSION_START

### GSTRING_START

    static final int GSTRING_START

### IDENTIFIER

    static final int IDENTIFIER

### INFIX_OPERATOR

    static final int INFIX_OPERATOR

### INTDIV

    static final int INTDIV

### INTDIV_EQUAL

    static final int INTDIV_EQUAL

### INTEGER_NUMBER

    static final int INTEGER_NUMBER

### KEYWORD

    static final int KEYWORD

### KEYWORD_ABSTRACT

    static final int KEYWORD_ABSTRACT

### KEYWORD_AS

    static final int KEYWORD_AS

### KEYWORD_ASSERT

    static final int KEYWORD_ASSERT

### KEYWORD_BOOLEAN

    static final int KEYWORD_BOOLEAN

### KEYWORD_BREAK

    static final int KEYWORD_BREAK

### KEYWORD_BYTE

    static final int KEYWORD_BYTE

### KEYWORD_CASE

    static final int KEYWORD_CASE

### KEYWORD_CATCH

    static final int KEYWORD_CATCH

### KEYWORD_CHAR

    static final int KEYWORD_CHAR

### KEYWORD_CLASS

    static final int KEYWORD_CLASS

### KEYWORD_CONST

    static final int KEYWORD_CONST

### KEYWORD_CONTINUE

    static final int KEYWORD_CONTINUE

### KEYWORD_DEF

    static final int KEYWORD_DEF

### KEYWORD_DEFAULT

    static final int KEYWORD_DEFAULT

### KEYWORD_DEFMACRO

    static final int KEYWORD_DEFMACRO

### KEYWORD_DO

    static final int KEYWORD_DO

### KEYWORD_DOUBLE

    static final int KEYWORD_DOUBLE

### KEYWORD_ELSE

    static final int KEYWORD_ELSE

### KEYWORD_EXPRESSION

    static final int KEYWORD_EXPRESSION

### KEYWORD_EXTENDS

    static final int KEYWORD_EXTENDS

### KEYWORD_FALSE

    static final int KEYWORD_FALSE

### KEYWORD_FINAL

    static final int KEYWORD_FINAL

### KEYWORD_FINALLY

    static final int KEYWORD_FINALLY

### KEYWORD_FLOAT

    static final int KEYWORD_FLOAT

### KEYWORD_FOR

    static final int KEYWORD_FOR

### KEYWORD_GOTO

    static final int KEYWORD_GOTO

### KEYWORD_IDENTIFIER

    static final int KEYWORD_IDENTIFIER

### KEYWORD_IF

    static final int KEYWORD_IF

### KEYWORD_IMPLEMENTS

    static final int KEYWORD_IMPLEMENTS

### KEYWORD_IMPORT

    static final int KEYWORD_IMPORT

### KEYWORD_IN

    static final int KEYWORD_IN

### KEYWORD_INSTANCEOF

    static final int KEYWORD_INSTANCEOF

### KEYWORD_INT

    static final int KEYWORD_INT

### KEYWORD_INTERFACE

    static final int KEYWORD_INTERFACE

### KEYWORD_LONG

    static final int KEYWORD_LONG

### KEYWORD_MIXIN

    static final int KEYWORD_MIXIN

### KEYWORD_NATIVE

    static final int KEYWORD_NATIVE

### KEYWORD_NEW

    static final int KEYWORD_NEW

### KEYWORD_NULL

    static final int KEYWORD_NULL

### KEYWORD_PACKAGE

    static final int KEYWORD_PACKAGE

### KEYWORD_PRIVATE

    static final int KEYWORD_PRIVATE

### KEYWORD_PROPERTY

    static final int KEYWORD_PROPERTY

### KEYWORD_PROTECTED

    static final int KEYWORD_PROTECTED

### KEYWORD_PUBLIC

    static final int KEYWORD_PUBLIC

### KEYWORD_RETURN

    static final int KEYWORD_RETURN

### KEYWORD_SHORT

    static final int KEYWORD_SHORT

### KEYWORD_STATIC

    static final int KEYWORD_STATIC

### KEYWORD_SUPER

    static final int KEYWORD_SUPER

### KEYWORD_SWITCH

    static final int KEYWORD_SWITCH

### KEYWORD_SYNCHRONIZED

    static final int KEYWORD_SYNCHRONIZED

### KEYWORD_THIS

    static final int KEYWORD_THIS

### KEYWORD_THROW

    static final int KEYWORD_THROW

### KEYWORD_THROWS

    static final int KEYWORD_THROWS

### KEYWORD_TRANSIENT

    static final int KEYWORD_TRANSIENT

### KEYWORD_TRUE

    static final int KEYWORD_TRUE

### KEYWORD_TRY

    static final int KEYWORD_TRY

### KEYWORD_VOID

    static final int KEYWORD_VOID

### KEYWORD_VOLATILE

    static final int KEYWORD_VOLATILE

### KEYWORD_WHILE

    static final int KEYWORD_WHILE

### LEFT_CURLY_BRACE

    static final int LEFT_CURLY_BRACE

### LEFT_OF_MATCHED_CONTAINER

    static final int LEFT_OF_MATCHED_CONTAINER

### LEFT_PARENTHESIS

    static final int LEFT_PARENTHESIS

### LEFT_SHIFT

    static final int LEFT_SHIFT

### LEFT_SHIFT_EQUAL

    static final int LEFT_SHIFT_EQUAL

### LEFT_SQUARE_BRACKET

    static final int LEFT_SQUARE_BRACKET

### LITERAL

    static final int LITERAL

### LITERAL_EXPRESSION

    static final int LITERAL_EXPRESSION

### LOGICAL_AND

    static final int LOGICAL_AND

### LOGICAL_AND_EQUAL

    static final int LOGICAL_AND_EQUAL

### LOGICAL_OPERATOR

    static final int LOGICAL_OPERATOR

### LOGICAL_OR

    static final int LOGICAL_OR

### LOGICAL_OR_EQUAL

    static final int LOGICAL_OR_EQUAL

### LOOP

    static final int LOOP

### MATCHED_CONTAINER

    static final int MATCHED_CONTAINER

### MATCH_REGEX

    static final int MATCH_REGEX

### MATH_OPERATOR

    static final int MATH_OPERATOR

### METHOD_CALL_STARTERS

    static final int METHOD_CALL_STARTERS

### MINUS

    static final int MINUS

### MINUS_EQUAL

    static final int MINUS_EQUAL

### MINUS_MINUS

    static final int MINUS_MINUS

### MOD

    static final int MOD

### MOD_EQUAL

    static final int MOD_EQUAL

### MULTIPLY

    static final int MULTIPLY

### MULTIPLY_EQUAL

    static final int MULTIPLY_EQUAL

### NAMED_VALUE

    static final int NAMED_VALUE

### NAVIGATE

    static final int NAVIGATE

### NEWLINE

    static final int NEWLINE

### NOT

    static final int NOT

### NOT_EOF

    static final int NOT_EOF

### NUMBER

    static final int NUMBER

### OPERATOR_EXPRESSION

    static final int OPERATOR_EXPRESSION

### OPTIONAL_DATATYPE_FOLLOWERS

    static final int OPTIONAL_DATATYPE_FOLLOWERS

### PARAMETER_TERMINATORS

    static final int PARAMETER_TERMINATORS

### PIPE

    static final int PIPE

### PLUS

    static final int PLUS

### PLUS_EQUAL

    static final int PLUS_EQUAL

### PLUS_PLUS

    static final int PLUS_PLUS

### POSTFIX_MINUS_MINUS

    static final int POSTFIX_MINUS_MINUS

### POSTFIX_OPERATOR

    static final int POSTFIX_OPERATOR

### POSTFIX_PLUS_PLUS

    static final int POSTFIX_PLUS_PLUS

### POWER

    static final int POWER

### POWER_EQUAL

    static final int POWER_EQUAL

### PRECLUDES_CAST_OPERATOR

    static final int PRECLUDES_CAST_OPERATOR

### PREFIX_MINUS

    static final int PREFIX_MINUS

### PREFIX_MINUS_MINUS

    static final int PREFIX_MINUS_MINUS

### PREFIX_OPERATOR

    static final int PREFIX_OPERATOR

### PREFIX_OR_INFIX_OPERATOR

    static final int PREFIX_OR_INFIX_OPERATOR

### PREFIX_PLUS

    static final int PREFIX_PLUS

### PREFIX_PLUS_PLUS

    static final int PREFIX_PLUS_PLUS

### PRIMITIVE_TYPE

    static final int PRIMITIVE_TYPE

### PURE_PREFIX_OPERATOR

    static final int PURE_PREFIX_OPERATOR

### QUESTION

    static final int QUESTION

### RANGE_OPERATOR

    static final int RANGE_OPERATOR

### REGEX_COMPARISON_OPERATOR

    static final int REGEX_COMPARISON_OPERATOR

### REGEX_PATTERN

    static final int REGEX_PATTERN

### RESERVED_KEYWORD

    static final int RESERVED_KEYWORD

### RIGHT_CURLY_BRACE

    static final int RIGHT_CURLY_BRACE

### RIGHT_OF_MATCHED_CONTAINER

    static final int RIGHT_OF_MATCHED_CONTAINER

### RIGHT_PARENTHESIS

    static final int RIGHT_PARENTHESIS

### RIGHT_SHIFT

    static final int RIGHT_SHIFT

### RIGHT_SHIFT_EQUAL

    static final int RIGHT_SHIFT_EQUAL

### RIGHT_SHIFT_UNSIGNED

    static final int RIGHT_SHIFT_UNSIGNED

### RIGHT_SHIFT_UNSIGNED_EQUAL

    static final int RIGHT_SHIFT_UNSIGNED_EQUAL

### RIGHT_SQUARE_BRACKET

    static final int RIGHT_SQUARE_BRACKET

### SEMICOLON

    static final int SEMICOLON

### SIGN

    static final int SIGN

### SIMPLE_EXPRESSION

    static final int SIMPLE_EXPRESSION

### STAR

    static final int STAR

### STAR_STAR

    static final int STAR_STAR

### STRING

    static final int STRING

### SWITCH_BLOCK_TERMINATORS

    static final int SWITCH_BLOCK_TERMINATORS

### SWITCH_ENTRIES

    static final int SWITCH_ENTRIES

### SYMBOL

    static final int SYMBOL

### SYNTHETIC

    static final int SYNTHETIC

### SYNTH_BLOCK

    static final int SYNTH_BLOCK

### SYNTH_CAST

    static final int SYNTH_CAST

### SYNTH_CLASS

    static final int SYNTH_CLASS

### SYNTH_CLOSURE

    static final int SYNTH_CLOSURE

### SYNTH_COMPILATION_UNIT

    static final int SYNTH_COMPILATION_UNIT

### SYNTH_EXPRESSION

    static final int SYNTH_EXPRESSION

### SYNTH_GSTRING

    static final int SYNTH_GSTRING

### SYNTH_INTERFACE

    static final int SYNTH_INTERFACE

### SYNTH_LABEL

    static final int SYNTH_LABEL

### SYNTH_LIST

    static final int SYNTH_LIST

### SYNTH_MAP

    static final int SYNTH_MAP

### SYNTH_METHOD

    static final int SYNTH_METHOD

### SYNTH_METHOD_CALL

    static final int SYNTH_METHOD_CALL

### SYNTH_MIXIN

    static final int SYNTH_MIXIN

### SYNTH_PARAMETER_DECLARATION

    static final int SYNTH_PARAMETER_DECLARATION

### SYNTH_PROPERTY

    static final int SYNTH_PROPERTY

### SYNTH_TERNARY

    static final int SYNTH_TERNARY

### SYNTH_TUPLE

    static final int SYNTH_TUPLE

### SYNTH_VARIABLE_DECLARATION

    static final int SYNTH_VARIABLE_DECLARATION

### TRUTH_VALUE

    static final int TRUTH_VALUE

### TYPE_DECLARATION

    static final int TYPE_DECLARATION

### TYPE_LIST_TERMINATORS

    static final int TYPE_LIST_TERMINATORS

### TYPE_NAME

    static final int TYPE_NAME

### UNKNOWN

    static final int UNKNOWN

### UNSAFE_OVER_NEWLINES

    static final int UNSAFE_OVER_NEWLINES

Constructor Detail

### Types

    Types()

Method Detail

### canMean

    public static boolean canMean(int actual, int preferred)

  Given two types, returns true if the first can be viewed as the second. NOTE that `canMean()` is orthogonal to `ofType()`.

### getDescription

    public static String getDescription(int type)

  Gets the description for the specified type.

### getKeywords

    public static Collection getKeywords()

### getPrecedence

    public static int getPrecedence(int type, boolean throwIfInvalid)

  Returns the precendence of the specified operator. Non-operator's will receive -1 or a GroovyBugError, depending on your preference.

### getText

    public static String getText(int type)

  Returns the text for the specified type. Returns "" if the text isn't found.

### isKeyword

    public static boolean isKeyword(String text)

### lookup

    public static int lookup(String text, int filter)

  Returns the type for the specified symbol/keyword text. Returns UNKNOWN if the text isn't found. You can filter finds on a type.

### lookupKeyword

    public static int lookupKeyword(String text)

  Returns the type for the specified keyword text. Returns UNKNOWN if the text isn't found.

### lookupSymbol

    public static int lookupSymbol(String text)

  Returns the type for the specified symbol text. Returns UNKNOWN if the text isn't found.

### makePostfix

    public static void makePostfix(CSTNode node, boolean throwIfInvalid)

  Converts a node from a generic type to a specific postfix type. Throws a `GroovyBugError` if the type can't be converted.

### makePrefix

    public static void makePrefix(CSTNode node, boolean throwIfInvalid)

  Converts a node from a generic type to a specific prefix type. Throws a `GroovyBugError` if the type can't be converted and requested.

### ofType

    public static boolean ofType(int specific, int general)

  Given two types, returns true if the second describes the first.

Copyright © 2003-2009 The Codehaus. All rights reserved.