Class Visitor.WithDefaultCase<T>

  • All Implemented Interfaces:
    Visitor<T>
    Enclosing interface:
    Visitor<T>

    public abstract static class Visitor.WithDefaultCase<T>
    extends java.lang.Object
    implements Visitor<T>
    A type visitor with a default behaviour.
    • Constructor Detail

      • WithDefaultCase

        public WithDefaultCase()
    • Method Detail

      • caseDefault

        @ForOverride
        protected abstract T caseDefault​(@Nullable
                                         JSType type)
        Called for all cases unless the specific case is overridden in the concrete subclass.

        null is passed iff the caller is a spcific case that has no JSType argument, example caseAllType().

      • caseNoType

        public T caseNoType​(NoType type)
        Description copied from interface: Visitor
        Bottom type's case.
        Specified by:
        caseNoType in interface Visitor<T>
      • caseAllType

        public T caseAllType()
        Description copied from interface: Visitor
        All type's case.
        Specified by:
        caseAllType in interface Visitor<T>
      • caseBooleanType

        public T caseBooleanType()
        Description copied from interface: Visitor
        Boolean value type's case.
        Specified by:
        caseBooleanType in interface Visitor<T>
      • caseNoObjectType

        public T caseNoObjectType()
        Description copied from interface: Visitor
        Bottom Object type's case.
        Specified by:
        caseNoObjectType in interface Visitor<T>
      • caseUnknownType

        public T caseUnknownType()
        Description copied from interface: Visitor
        Unknown type's case.
        Specified by:
        caseUnknownType in interface Visitor<T>
      • caseNullType

        public T caseNullType()
        Description copied from interface: Visitor
        Null type's case.
        Specified by:
        caseNullType in interface Visitor<T>
      • caseNumberType

        public T caseNumberType()
        Description copied from interface: Visitor
        Number value type's case.
        Specified by:
        caseNumberType in interface Visitor<T>
      • caseBigIntType

        public T caseBigIntType()
        Description copied from interface: Visitor
        BigInt value type's case.
        Specified by:
        caseBigIntType in interface Visitor<T>
      • caseStringType

        public T caseStringType()
        Description copied from interface: Visitor
        String value type's case.
        Specified by:
        caseStringType in interface Visitor<T>
      • caseSymbolType

        public T caseSymbolType()
        Description copied from interface: Visitor
        Symbol value type's case.
        Specified by:
        caseSymbolType in interface Visitor<T>
      • caseVoidType

        public T caseVoidType()
        Description copied from interface: Visitor
        Void type's case.
        Specified by:
        caseVoidType in interface Visitor<T>