Class Type

  • public class Type
    extends java.lang.Object
    A used type - object or primitive. Date: 24/10/2016
    Yaron Yamin
    • Constructor Summary

      Constructor Description
      Type​(com.intellij.psi.PsiClass psiClass, TypeDictionary typeDictionary, int maxRecursionDepth, boolean shouldResolveAllMethods)  
      Type​(com.intellij.psi.PsiType psiType, java.lang.Object typePsiElement, @Nullable TypeDictionary typeDictionary, int maxRecursionDepth, boolean shouldResolveAllMethods)  
      Type​(java.lang.String canonicalName, java.lang.String name, java.lang.String packageName, boolean isPrimitive, boolean isInterface, boolean isAbstract, boolean array, int arrayDimensions, boolean varargs, java.util.List<Type> composedTypes)  
    • Constructor Detail

      • Type

        public Type​(java.lang.String canonicalName,
                    java.lang.String name,
                    java.lang.String packageName,
                    boolean isPrimitive,
                    boolean isInterface,
                    boolean isAbstract,
                    boolean array,
                    int arrayDimensions,
                    boolean varargs,
                    java.util.List<Type> composedTypes)
      • Type

        public Type​(com.intellij.psi.PsiType psiType,
                    java.lang.Object typePsiElement,
                    @Nullable TypeDictionary typeDictionary,
                    int maxRecursionDepth,
                    boolean shouldResolveAllMethods)
      • Type

        public Type​(com.intellij.psi.PsiClass psiClass,
                    TypeDictionary typeDictionary,
                    int maxRecursionDepth,
                    boolean shouldResolveAllMethods)
    • Method Detail

      • resolveType

        public static @NotNull com.intellij.psi.PsiClassType resolveType​(com.intellij.psi.PsiClass psiClass)
      • resolveDependencies

        public void resolveDependencies​(@Nullable
                                        @Nullable TypeDictionary typeDictionary,
                                        int maxRecursionDepth,
                                        com.intellij.psi.PsiType psiType,
                                        boolean shouldResolveAllMethods)
      • equals

        public boolean equals​(java.lang.Object o)
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • findConstructors

        public java.util.List<Method> findConstructors()
        Find methods that are constructors
        Type's constructors sorted in revers order by no. of constructor params
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • getCanonicalName

        public java.lang.String getCanonicalName()
        Full canonical name including package
      • getName

        public java.lang.String getName()
        Type's name
      • isPrimitive

        public boolean isPrimitive()
        true - if this type is a primitive. i.e. int, boolean
      • getPackageName

        public java.lang.String getPackageName()
        Type's package
      • getComposedTypes

        public java.util.List<Type> getComposedTypes()
        Used types of generic params if relevant
      • isArray

        public boolean isArray()
        true when type is an array
      • getArrayDimensions

        public int getArrayDimensions()
        no. of array dimensions. relevant only in case this type is an array
      • isVarargs

        public boolean isVarargs()
        true when this type is a varar
      • getEnumValues

        public java.util.List<java.lang.String> getEnumValues()
        enum name values. relevant for enum types
      • isEnum

        public boolean isEnum()
        true if this type is an enum
      • isInterface

        public boolean isInterface()
        true if this type is an interface
      • isAbstract

        public boolean isAbstract()
        true if this type is an abstract class
      • isStatic

        public boolean isStatic()
        true if this is a static type/class or a Scala Object
      • isFinal

        public boolean isFinal()
        true if type id defined as final
      • getMethods

        public java.util.List<Method> getMethods()
        types methods if relevant
      • getParentContainerClass

        public Type getParentContainerClass()
        in case this is an inner class - the outer class where this type is defined
      • getFields

        public java.util.List<Field> getFields()
        fields defined for this type
      • isDependenciesResolved

        public boolean isDependenciesResolved()
        true when all constructor dependencies, if exists, have been resolved by object graph introspection
      • isDependenciesResolvable

        public boolean isDependenciesResolvable()
        used internally when building object graph
      • isHasDefaultConstructor

        public boolean isHasDefaultConstructor()
        true when type has a default constructor
      • getImplementedInterfaces

        public java.util.List<Type> getImplementedInterfaces()
        interfaces implemented by this type if any
      • isCaseClass

        public boolean isCaseClass()
        true - if this is a scala case class
      • isSealed

        public boolean isSealed()
        true - if this is a scala sealed class
      • getChildObjectsQualifiedNames

        public java.util.List<java.lang.String> getChildObjectsQualifiedNames()
        relevant of scala sealed classes