Class SymTypeOfGenerics


  • public class SymTypeOfGenerics
    extends SymTypeExpression
    SymTypeOfGenerics stores any kind of TypeConstructor applied to Arguments, such as Map< int,Person > List<Person>, List< Set< List< a >>>. This subsumes all kinds of generic Types from several of the MC-Type grammars.
    • Field Detail

      • unboxMap

        @Deprecated(forRemoval=true)
        public static final java.util.Map<java.lang.String,​java.lang.String> unboxMap
        Deprecated, for removal: This API element is subject to removal in a future version.
        Map for unboxing generic types (e.g. "java.util.Collection" -> "Collection")
      • boxMap

        @Deprecated(forRemoval=true)
        public static final java.util.Map<java.lang.String,​java.lang.String> boxMap
        Deprecated, for removal: This API element is subject to removal in a future version.
        Map for boxing generic types (e.g. "Collection" -> "java.util.Collection") Results are fully qualified.
      • arguments

        protected java.util.List<SymTypeExpression> arguments
        List of arguments of a type constructor
    • Constructor Detail

      • SymTypeOfGenerics

        @Deprecated(forRemoval=true)
        public SymTypeOfGenerics​(TypeSymbol typeSymbol)
        Deprecated, for removal: This API element is subject to removal in a future version.
        use SymTypeExpressionFactory The Factory then uses the constructor below
      • SymTypeOfGenerics

        public SymTypeOfGenerics​(TypeSymbol typeSymbol,
                                 java.util.List<SymTypeExpression> arguments)
        Constructor with all parameters that are stored:
    • Method Detail

      • unbox

        @Deprecated(forRemoval=true)
        public static java.lang.String unbox​(SymTypeOfGenerics type)
        Deprecated, for removal: This API element is subject to removal in a future version.
        use SymTypeUnboxingVisitor
        unboxing generic types (e.g. "java.util.Collection" -> "Collection"). otherwise return is unchanged
        Parameters:
        type -
        Returns:
      • box

        @Deprecated(forRemoval=true)
        public static java.lang.String box​(SymTypeOfGenerics type)
        Deprecated, for removal: This API element is subject to removal in a future version.
        use SymtypeBoxingVisitor
        Boxing generic types (e.g. "Collection" -> "java.util.Collection") Results are fully qualified. Otherwise return is unchanged
        Parameters:
        type -
        Returns:
      • getTypeConstructorFullName

        public java.lang.String getTypeConstructorFullName()
      • printTypeWithoutTypeArgument

        @Deprecated(forRemoval=true)
        public java.lang.String printTypeWithoutTypeArgument()
        Deprecated, for removal: This API element is subject to removal in a future version.
        same as the the other 2 methods even in spec? use getTypeConstructorFullName()
      • getFullName

        @Deprecated(forRemoval=true)
        public java.lang.String getFullName()
        Deprecated, for removal: This API element is subject to removal in a future version.
        same as the the other 2 methods even in spec? use getTypeConstructorFullName()
      • getBaseName

        @Deprecated(forRemoval=true)
        public java.lang.String getBaseName()
        Deprecated, for removal: This API element is subject to removal in a future version.
        unused outside of tests, but not required for tests use Names instead, or getTypeInfo().getName()
        getBaseName: get the unqualified Name (no ., no Package)
      • deepEqualsWithoutArguments

        public boolean deepEqualsWithoutArguments​(SymTypeExpression sym)
      • getDeclaredType

        public SymTypeOfGenerics getDeclaredType()
        returns the declared type, e.g., for List<int>, this will return List<T> where T is a type variable.
      • containsArgument

        public boolean containsArgument​(java.lang.Object element)
      • containsAllArguments

        public boolean containsAllArguments​(java.util.Collection<?> collection)
      • isEmptyArguments

        public boolean isEmptyArguments()
      • iteratorArguments

        public java.util.Iterator<SymTypeExpression> iteratorArguments()
      • sizeArguments

        public int sizeArguments()
      • toArrayArguments

        public java.lang.Object[] toArrayArguments()
      • spliteratorArguments

        public java.util.Spliterator<SymTypeExpression> spliteratorArguments()
      • streamArguments

        public java.util.stream.Stream<SymTypeExpression> streamArguments()
      • parallelStreamArguments

        public java.util.stream.Stream<SymTypeExpression> parallelStreamArguments()
      • indexOfArgument

        public int indexOfArgument​(java.lang.Object element)
      • lastIndexOfArgument

        public int lastIndexOfArgument​(java.lang.Object element)
      • equalsArguments

        public boolean equalsArguments​(java.lang.Object o)
      • hashCodeArguments

        public int hashCodeArguments()
      • listIteratorArguments

        public java.util.ListIterator<SymTypeExpression> listIteratorArguments()
      • listIteratorArguments

        public java.util.ListIterator<SymTypeExpression> listIteratorArguments​(int index)
      • subListArguments

        public java.util.List<SymTypeExpression> subListArguments​(int start,
                                                                  int end)
      • clearArguments

        public void clearArguments()
      • addAllArguments

        public boolean addAllArguments​(java.util.Collection<? extends SymTypeExpression> collection)
      • removeArgument

        public boolean removeArgument​(java.lang.Object element)
      • removeAllArguments

        public boolean removeAllArguments​(java.util.Collection<?> collection)
      • retainAllArguments

        public boolean retainAllArguments​(java.util.Collection<?> collection)
      • removeIfArgument

        public boolean removeIfArgument​(java.util.function.Predicate<? super SymTypeExpression> filter)
      • forEachArguments

        public void forEachArguments​(java.util.function.Consumer<? super SymTypeExpression> action)
      • addAllArguments

        public boolean addAllArguments​(int index,
                                       java.util.Collection<? extends SymTypeExpression> collection)
      • replaceAllArguments

        public void replaceAllArguments​(java.util.function.UnaryOperator<SymTypeExpression> operator)
      • sortArguments

        public void sortArguments​(java.util.Comparator<? super SymTypeExpression> comparator)
      • setArgumentList

        public void setArgumentList​(java.util.List<SymTypeExpression> arguments)