Class AbstractJavaClassMetric

    • Constructor Detail

      • AbstractJavaClassMetric

        public AbstractJavaClassMetric()
    • Method Detail

      • supports

        public boolean supports​(ASTAnyTypeDeclaration node)
        Returns true if the metric can be computed on this type declaration. By default, annotation and interface declarations are filtered out.
        Specified by:
        supports in interface Metric<ASTAnyTypeDeclaration>
        Parameters:
        node - The type declaration
        Returns:
        True if the metric can be computed on this type declaration
      • countMatchingOpSigs

        protected int countMatchingOpSigs​(ASTAnyTypeDeclaration classNode,
                                          JavaOperationSigMask mask)
        Counts the operations matching the signature mask in this class.
        Parameters:
        classNode - The class on which to count
        mask - The mask
        Returns:
        The number of operations matching the signature mask
      • countMatchingFieldSigs

        protected int countMatchingFieldSigs​(ASTAnyTypeDeclaration classNode,
                                             JavaFieldSigMask mask)
        Counts the fields matching the signature mask in this class.
        Parameters:
        classNode - The class on which to count
        mask - The mask
        Returns:
        The number of fields matching the signature mask