Class TypeAccess

    • Constructor Detail

      • TypeAccess

        public TypeAccess​(com.hello2morrow.sonargraph.core.model.programming.IType element)
        Internal use only
    • Method Detail

      • isAbstract

        public boolean isAbstract()
        Specified by:
        isAbstract in interface ITypeAccess
        Returns:
        true, if this is an abstract type.
      • isAnonymous

        public boolean isAnonymous()
        Specified by:
        isAnonymous in interface ITypeAccess
        Returns:
        true, if this is an anonymous type.
      • isNested

        public boolean isNested()
        Specified by:
        isNested in interface ITypeAccess
        Returns:
        true, if this is a nested type.
      • isInterface

        public boolean isInterface()
        Specified by:
        isInterface in interface ITypeAccess
        Returns:
        true, if this is an interface.
      • isClass

        public boolean isClass()
        Specified by:
        isClass in interface ITypeAccess
        Returns:
        true, if this is a class.
      • getNumberOfStatementsMetric

        public java.lang.Number getNumberOfStatementsMetric()
        Specified by:
        getNumberOfStatementsMetric in interface ITypeAccess
        Returns:
        the metric or 'null' if not available
      • getSourceElementCountMetric

        public java.lang.Number getSourceElementCountMetric()
        Specified by:
        getSourceElementCountMetric in interface ITypeAccess
        Returns:
        the metric or 'null' if not available
      • getLCOM4Metric

        public java.lang.Number getLCOM4Metric()
        Specified by:
        getLCOM4Metric in interface ITypeAccess
        Returns:
        the metric or 'null' if not available
      • getMaxNestingMetric

        public java.lang.Number getMaxNestingMetric()
        Specified by:
        getMaxNestingMetric in interface ITypeAccess
        Returns:
        the metric or 'null' if not available
      • getAverageComplexityMetric

        public java.lang.Number getAverageComplexityMetric()
        Specified by:
        getAverageComplexityMetric in interface ITypeAccess
        Returns:
        the metric or 'null' if not available
      • getMethods

        public java.util.List<? extends IMethodAccess> getMethods()
        Get a list of all methods in this type.
        Specified by:
        getMethods in interface ITypeAccess
        Returns:
        see above
      • getFields

        public java.util.List<? extends IFieldAccess> getFields()
        Specified by:
        getFields in interface ITypeAccess
        Returns:
        a list of all fields in this type.
      • typeOf

        public boolean typeOf​(java.lang.String fqName)
        Checks if the type is the same or a subclass of the given fully qualified name.
        Specified by:
        typeOf in interface ITypeAccess
        Parameters:
        fqName - fully qualified name
        Returns:
        true if this type is a subclass of the given fq name, false if not.