Class Method

  • public class Method
    extends java.lang.Object
    A class Method. Date: 24/10/2016
    Yaron Yamin
    • Constructor Detail

      • Method

        public Method​(com.intellij.psi.PsiMethod psiMethod,
                      com.intellij.psi.PsiClass srcClass,
                      int maxRecursionDepth,
                      TypeDictionary typeDictionary,
                      com.intellij.psi.PsiType ownerClassPsiType)
    • Method Detail

      • hasReturn

        public boolean hasReturn()
        true - if method has a return type
      • equals

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

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

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

        public Type getReturnType()
        Method's return type
      • getName

        public java.lang.String getName()
        method name
      • getOwnerClassCanonicalType

        public java.lang.String getOwnerClassCanonicalType()
        method owner type cannonical name
      • getMethodParams

        public java.util.List<Param> getMethodParams()
        method arguments
      • isPrivate

        public boolean isPrivate()
        true - if method has private modifier
      • isProtected

        public boolean isProtected()
        true - if method has protected modifier
      • isDefault

        public boolean isDefault()
        true - if method has default (package-private access modifier)
      • isPublic

        public boolean isPublic()
        true - if method has public modifier
      • isAbstract

        public boolean isAbstract()
        true - if method is abstract
      • isNative

        public boolean isNative()
        true - if method defined as native
      • isStatic

        public boolean isStatic()
        true - if this is a static method
      • isSetter

        public boolean isSetter()
        true - if method is a setter
      • isGetter

        public boolean isGetter()
        true - if method is a getter
      • isConstructor

        public boolean isConstructor()
        true - if method is a constructor
      • isOverridden

        public boolean isOverridden()
        true - if method is overridden in child class
      • isInherited

        public boolean isInherited()
        true - if method is inherited from parent class
      • isInInterface

        public boolean isInInterface()
        true - if owner type is an interface
      • isSynthetic

        public boolean isSynthetic()
        true - if method is synthetically generated. common for scala methods
      • getPropertyName

        public java.lang.String getPropertyName()
        the underlying field property name. relevant for getter/setter
      • isAccessible

        public boolean isAccessible()
        true - when accessible from class under test
      • isPrimaryConstructor

        public boolean isPrimaryConstructor()
        true - is Primary Constructor (relevant for Scala)
      • getDirectMethodCalls

        public java.util.Set<MethodCall> getDirectMethodCalls()
        methods called directly from this method
      • getMethodCalls

        public java.util.Set<MethodCall> getMethodCalls()
        methods called directly from this method or on the call stack from this method via other methods belonging to the same type hierarchy
      • getMethodReferences

        public java.util.Set<Method> getMethodReferences()
        methods referenced from this method. i.e. SomeClassName::someMethodName
      • getInternalReferences

        public java.util.Set<Reference> getInternalReferences()
        references included in this method's implementation
      • getMethodId

        public java.lang.String getMethodId()
        formatted method id. a string used to uniquely discriminate this method from others
      • getIndirectlyAffectedFields

        public java.util.Set<Field> getIndirectlyAffectedFields()
        Fields affected (assigned to) by methods called from this method. currently calculated only for constructors. i.e. when delegating to other constructors