Class Type
java.lang.Object
com.weirddev.testme.intellij.template.context.Type
A used type - object or primitive.
Date: 24/10/2016
- Author:
- Yaron Yamin
-
Constructor Summary
ConstructorDescriptionType
(com.intellij.psi.PsiClass psiClass, TypeDictionary typeDictionary, int maxRecursionDepth, boolean shouldResolveAllMethods) Type
(com.intellij.psi.PsiType psiType, @Nullable Object typePsiElement, @Nullable TypeDictionary typeDictionary, int maxRecursionDepth, boolean shouldResolveAllMethods) Type
(String canonicalName, String name, String packageName, boolean isPrimitive, boolean isInterface, boolean isAbstract, boolean array, int arrayDimensions, boolean varargs, List<Type> composedTypes) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Find methods that are constructorsint
no.Full canonical name including packagerelevant of scala sealed classesUsed types of generic params if relevantenum name values.fields defined for this typeinterfaces implemented by this type if anytype's methods if relevantgetName()
Type's nameType's packagein case this is an inner class - the outer class where this type is definedboolean
int
hashCode()
boolean
true if this type is an abstract classboolean
is type annotated with dependency injection annotations,boolean
isArray()
true when type is an arrayboolean
true - if this is a scala case classboolean
used internally when building object graphboolean
true when all constructor dependencies, if exists, have been resolved by object graph introspectionboolean
isEnum()
true if this type is an enumboolean
isFinal()
true if type id defined as finalboolean
true when type has a default constructorboolean
true if this type is an interfaceboolean
true - if this type is a primitive.boolean
isSealed()
true - if this is a scala sealed classboolean
isStatic()
true if this is a static type/class or a Scala Objectboolean
true when this type is a vararvoid
resolveDependencies
(@Nullable TypeDictionary typeDictionary, int maxRecursionDepth, com.intellij.psi.PsiType psiType, boolean shouldResolveAllMethods) static @NotNull com.intellij.psi.PsiClassType
resolveType
(com.intellij.psi.PsiClass psiClass) toString()
-
Constructor Details
-
Type
@Deprecated public Type(String canonicalName, String name, String packageName, boolean isPrimitive, boolean isInterface, boolean isAbstract, boolean array, int arrayDimensions, boolean varargs, List<Type> composedTypes) Deprecated. -
Type
public Type(com.intellij.psi.PsiType psiType, @Nullable @Nullable Object typePsiElement, @Nullable @Nullable TypeDictionary typeDictionary, int maxRecursionDepth, boolean shouldResolveAllMethods) -
Type
public Type(com.intellij.psi.PsiClass psiClass, TypeDictionary typeDictionary, int maxRecursionDepth, boolean shouldResolveAllMethods)
-
-
Method Details
-
resolveType
@NotNull 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) -
findConstructors
Find methods that are constructors- Returns:
- Type's constructors sorted in revers order by no. of constructor params
-
hasConstructor
public boolean hasConstructor()- Returns:
- true if type has constructor
-
getCanonicalName
Full canonical name including package -
getName
Type's name -
isPrimitive
public boolean isPrimitive()true - if this type is a primitive. i.e. int, boolean -
getPackageName
Type's package -
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 -
isEnum
public boolean isEnum()true if this type is an enum -
getEnumValues
enum name values. relevant for enum types -
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 -
getParentContainerClass
in case this is an inner class - the outer class where this type is defined -
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 -
isCaseClass
public boolean isCaseClass()true - if this is a scala case class -
isSealed
public boolean isSealed()true - if this is a scala sealed class -
getMethods
type's methods if relevant -
getFields
fields defined for this type -
getImplementedInterfaces
interfaces implemented by this type if any -
getChildObjectsQualifiedNames
relevant of scala sealed classes -
isAnnotatedByDI
public boolean isAnnotatedByDI()is type annotated with dependency injection annotations, -
toString
-
equals
-
hashCode
public int hashCode()
-