author Eric Bruneton
  export class TypeReference { /**
     * The sort of type references that target a type parameter of a generic
     * class. See  {@link #getSort getSort} .
      static readonly CLASS_TYPE_PARAMETER : number = 0 ; /**
     * The sort of type references that target a type parameter of a generic
     * method. See  {@link #getSort getSort} .
      static readonly METHOD_TYPE_PARAMETER : number = 1 ; /**
     * The sort of type references that target the super class of a class or one
     * of the interfaces it implements. See  {@link #getSort getSort} .
      static readonly CLASS_EXTENDS : number = 16 ; /**
     * The sort of type references that target a bound of a type parameter of a
     * generic class. See  {@link #getSort getSort} .
      static readonly CLASS_TYPE_PARAMETER_BOUND : number = 17 ; /**
     * The sort of type references that target a bound of a type parameter of a
     * generic method. See  {@link #getSort getSort} .
      static readonly METHOD_TYPE_PARAMETER_BOUND : number = 18 ; /**
     * The sort of type references that target the type of a field. See
     *  {@link #getSort getSort} .
      static readonly FIELD : number = 19 ; /**
     * The sort of type references that target the return type of a method. See
     *  {@link #getSort getSort} .
      static readonly METHOD_RETURN : number = 20 ; /**
     * The sort of type references that target the receiver type of a method.
     * See  {@link #getSort getSort} .
      static readonly METHOD_RECEIVER : number = 21 ; /**
     * The sort of type references that target the type of a formal parameter of
     * a method. See  {@link #getSort getSort} .
      static readonly METHOD_FORMAL_PARAMETER : number = 22 ; /**
     * The sort of type references that target the type of an exception declared
     * in the throws clause of a method. See  {@link #getSort getSort} .
      static readonly THROWS : number = 23 ; /**
     * The sort of type references that target the type of a local variable in a
     * method. See  {@link #getSort getSort} .
      static readonly LOCAL_VARIABLE : number = 64 ; /**
     * The sort of type references that target the type of a resource variable
     * in a method. See  {@link #getSort getSort} .
      static readonly RESOURCE_VARIABLE : number = 65 ; /**
     * The sort of type references that target the type of the exception of a
     * 'catch' clause in a method. See  {@link #getSort getSort} .
      static readonly EXCEPTION_PARAMETER : number = 66 ; /**
     * The sort of type references that target the type declared in an
     * 'instanceof' instruction. See  {@link #getSort getSort} .
      static readonly INSTANCEOF : number = 67 ; /**
     * The sort of type references that target the type of the object created by
     * a 'new' instruction. See  {@link #getSort getSort} .
      static readonly NEW : number = 68 ; /**
     * The sort of type references that target the receiver type of a
     * constructor reference. See  {@link #getSort getSort} .
      static readonly CONSTRUCTOR_REFERENCE : number = 69 ; /**
     * The sort of type references that target the receiver type of a method
     * reference. See  {@link #getSort getSort} .
      static readonly METHOD_REFERENCE : number = 70 ; /**
     * The sort of type references that target the type declared in an explicit
     * or implicit cast instruction. See  {@link #getSort getSort} .
      static readonly CAST : number = 71 ; /**
     * The sort of type references that target a type parameter of a generic
     * constructor in a constructor call. See  {@link #getSort getSort} .
      static readonly CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT : number = 72 ; /**
     * The sort of type references that target a type parameter of a generic
     * method in a method call. See  {@link #getSort getSort} .
      static readonly METHOD_INVOCATION_TYPE_ARGUMENT : number = 73 ; /**
     * The sort of type references that target a type parameter of a generic
     * constructor in a constructor reference. See  {@link #getSort getSort} .
      static readonly CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT : number = 74 ; /**
     * The sort of type references that target a type parameter of a generic
     * method in a method reference. See  {@link #getSort getSort} .
      static readonly METHOD_REFERENCE_TYPE_ARGUMENT : number = 75 ; /**
     * The type reference value in Java class file format.
     */ private value : number ; param typeRef constructor ( typeRef ) { this . value = 0 ; this . value = typeRef ; } param sort {@link #FIELD FIELD} ,  {@link #METHOD_RETURN METHOD_RETURN} ,
     *  {@link #METHOD_RECEIVER METHOD_RECEIVER} ,
     *  {@link #LOCAL_VARIABLE LOCAL_VARIABLE} ,
     *  {@link #RESOURCE_VARIABLE RESOURCE_VARIABLE} ,
     *  {@link #INSTANCEOF INSTANCEOF} ,  {@link #NEW NEW} ,
     *  {@link #CONSTRUCTOR_REFERENCE CONSTRUCTOR_REFERENCE} , or
     *  {@link #METHOD_REFERENCE METHOD_REFERENCE} .
     *  return static newTypeReference ( sort ) { return new TypeReference ( sort << 24 ) ; } param sort {@link #CLASS_TYPE_PARAMETER CLASS_TYPE_PARAMETER} or
     *  {@link #METHOD_TYPE_PARAMETER METHOD_TYPE_PARAMETER} .
     *  param paramIndex return static newTypeParameterReference ( sort , paramIndex ) { return new TypeReference ( ( sort << 24 ) | ( paramIndex << 16 ) ) ; } param sort {@link #CLASS_TYPE_PARAMETER CLASS_TYPE_PARAMETER} or
     *  {@link #METHOD_TYPE_PARAMETER METHOD_TYPE_PARAMETER} .
     *  param paramIndex param boundIndex return static newTypeParameterBoundReference ( sort , paramIndex , boundIndex ) { return new TypeReference ( ( sort << 24 ) | ( paramIndex << 16 ) | ( boundIndex << 8 ) ) ; } param itfIndex return static newSuperTypeReference ( itfIndex ) { itfIndex &= 65535 ; return new TypeReference ( ( TypeReference . CLASS_EXTENDS << 24 ) | ( itfIndex << 8 ) ) ; } param paramIndex return static newFormalParameterReference ( paramIndex ) { return new TypeReference ( ( TypeReference . METHOD_FORMAL_PARAMETER << 24 ) | ( paramIndex << 16 ) ) ; } param exceptionIndex return static newExceptionReference ( exceptionIndex ) { return new TypeReference ( ( TypeReference . THROWS << 24 ) | ( exceptionIndex << 8 ) ) ; } param tryCatchBlockIndex return static newTryCatchReference ( tryCatchBlockIndex ) { return new TypeReference ( ( TypeReference . EXCEPTION_PARAMETER << 24 ) | ( tryCatchBlockIndex << 8 ) ) ; } param sort {@link #CAST CAST} ,
     *  {@link #CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
 * CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT},
     *  {@link #METHOD_INVOCATION_TYPE_ARGUMENT
 * METHOD_INVOCATION_TYPE_ARGUMENT},
     *  {@link #CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
 * CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or
     *  {@link #METHOD_REFERENCE_TYPE_ARGUMENT
 * METHOD_REFERENCE_TYPE_ARGUMENT}.
     *  param argIndex return static newTypeArgumentReference ( sort , argIndex ) { return new TypeReference ( ( sort << 24 ) | argIndex ) ; } return { link #CLASS_TYPE_PARAMETER CLASS_TYPE_PARAMETER},
     *  {@link #METHOD_TYPE_PARAMETER METHOD_TYPE_PARAMETER} ,
     *  {@link #CLASS_EXTENDS CLASS_EXTENDS} ,
     *  {@link #CLASS_TYPE_PARAMETER_BOUND CLASS_TYPE_PARAMETER_BOUND} ,
     *  {@link #METHOD_TYPE_PARAMETER_BOUND METHOD_TYPE_PARAMETER_BOUND} ,
     *  {@link #FIELD FIELD} ,  {@link #METHOD_RETURN METHOD_RETURN} ,
     *  {@link #METHOD_RECEIVER METHOD_RECEIVER} ,
     *  {@link #METHOD_FORMAL_PARAMETER METHOD_FORMAL_PARAMETER} ,
     *  {@link #THROWS THROWS} ,  {@link #LOCAL_VARIABLE LOCAL_VARIABLE} ,
     *  {@link #RESOURCE_VARIABLE RESOURCE_VARIABLE} ,
     *  {@link #EXCEPTION_PARAMETER EXCEPTION_PARAMETER} ,
     *  {@link #INSTANCEOF INSTANCEOF} ,  {@link #NEW NEW} ,
     *  {@link #CONSTRUCTOR_REFERENCE CONSTRUCTOR_REFERENCE} ,
     *  {@link #METHOD_REFERENCE METHOD_REFERENCE} ,  {@link #CAST CAST} ,
     *  {@link #CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
 * CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT},
     *  {@link #METHOD_INVOCATION_TYPE_ARGUMENT
 * METHOD_INVOCATION_TYPE_ARGUMENT},
     *  {@link #CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
 * CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or
     *  {@link #METHOD_REFERENCE_TYPE_ARGUMENT
 * METHOD_REFERENCE_TYPE_ARGUMENT}.
      getSort ( ) { return this . value >>> 24 ; } /**
     * Returns the index of the type parameter referenced by this type
     * reference. This method must only be used for type references whose sort
     * is  {@link #CLASS_TYPE_PARAMETER CLASS_TYPE_PARAMETER} ,
     *  {@link #METHOD_TYPE_PARAMETER METHOD_TYPE_PARAMETER} ,
     *  {@link #CLASS_TYPE_PARAMETER_BOUND CLASS_TYPE_PARAMETER_BOUND} or
     *  {@link #METHOD_TYPE_PARAMETER_BOUND METHOD_TYPE_PARAMETER_BOUND} .
     *
     *  return getTypeParameterIndex ( ) { return ( this . value & 16711680 ) >> 16 ; } /**
     * Returns the index of the type parameter bound, within the type parameter
     *  {@link #getTypeParameterIndex} , referenced by this type reference. This
     * method must only be used for type references whose sort is
     *  {@link #CLASS_TYPE_PARAMETER_BOUND CLASS_TYPE_PARAMETER_BOUND} or
     *  {@link #METHOD_TYPE_PARAMETER_BOUND METHOD_TYPE_PARAMETER_BOUND} .
     *
     *  return getTypeParameterBoundIndex ( ) { return ( this . value & 65280 ) >> 8 ; } /**
     * Returns the index of the "super type" of a class that is referenced by
     * this type reference. This method must only be used for type references
     * whose sort is  {@link #CLASS_EXTENDS CLASS_EXTENDS} .
     *
     *  return getSuperTypeIndex ( ) { return ( ( ( this . value & 16776960 ) >> 8 ) | 0 ) ; } /**
     * Returns the index of the formal parameter whose type is referenced by
     * this type reference. This method must only be used for type references
     * whose sort is  {@link #METHOD_FORMAL_PARAMETER METHOD_FORMAL_PARAMETER} .
     *
     *  return getFormalParameterIndex ( ) { return ( this . value & 16711680 ) >> 16 ; } /**
     * Returns the index of the exception, in a 'throws' clause of a method,
     * whose type is referenced by this type reference. This method must only be
     * used for type references whose sort is  {@link #THROWS THROWS} .
     *
     *  return getExceptionIndex ( ) { return ( this . value & 16776960 ) >> 8 ; } /**
     * Returns the index of the try catch block (using the order in which they
     * are visited with visitTryCatchBlock), whose 'catch' type is referenced by
     * this type reference. This method must only be used for type references
     * whose sort is  {@link #EXCEPTION_PARAMETER EXCEPTION_PARAMETER} .
     *
     *  return getTryCatchBlockIndex ( ) { return ( this . value & 16776960 ) >> 8 ; } /**
     * Returns the index of the type argument referenced by this type reference.
     * This method must only be used for type references whose sort is
     *  {@link #CAST CAST} ,  {@link #CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
 * CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT},
     *  {@link #METHOD_INVOCATION_TYPE_ARGUMENT METHOD_INVOCATION_TYPE_ARGUMENT} ,
     *  {@link #CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
 * CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or
     *  {@link #METHOD_REFERENCE_TYPE_ARGUMENT METHOD_REFERENCE_TYPE_ARGUMENT} .
     *
     *  return getTypeArgumentIndex ( ) { return this . value & 255 ; } return getValue ( ) { return this . value ; } }