org.sonar.java.ast.api
Enum JavaMetric

java.lang.Object
  extended by java.lang.Enum<JavaMetric>
      extended by org.sonar.java.ast.api.JavaMetric
All Implemented Interfaces:
Serializable, Comparable<JavaMetric>, org.sonar.squid.measures.MetricDef

public enum JavaMetric
extends Enum<JavaMetric>
implements org.sonar.squid.measures.MetricDef


Enum Constant Summary
CLASSES
           
COMMENT_BLANK_LINES
           
COMMENT_LINES_WITHOUT_HEADER
           
COMPLEXITY
           
FILES
           
LINES
           
LINES_OF_CODE
           
METHODS
           
PACKAGES
           
STATEMENTS
           
 
Method Summary
 boolean aggregateIfThereIsAlreadyAValue()
           
 org.sonar.squid.measures.CalculatedMetricFormula getCalculatedMetricFormula()
           
 String getName()
           
 boolean isCalculatedMetric()
           
 boolean isThereAggregationFormula()
           
static JavaMetric valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JavaMetric[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FILES

public static final JavaMetric FILES

LINES

public static final JavaMetric LINES

LINES_OF_CODE

public static final JavaMetric LINES_OF_CODE

COMMENT_LINES_WITHOUT_HEADER

public static final JavaMetric COMMENT_LINES_WITHOUT_HEADER

COMMENT_BLANK_LINES

public static final JavaMetric COMMENT_BLANK_LINES

STATEMENTS

public static final JavaMetric STATEMENTS

COMPLEXITY

public static final JavaMetric COMPLEXITY

METHODS

public static final JavaMetric METHODS

CLASSES

public static final JavaMetric CLASSES

PACKAGES

public static final JavaMetric PACKAGES
Method Detail

values

public static JavaMetric[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (JavaMetric c : JavaMetric.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static JavaMetric valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getName

public String getName()
Specified by:
getName in interface org.sonar.squid.measures.MetricDef

isCalculatedMetric

public boolean isCalculatedMetric()
Specified by:
isCalculatedMetric in interface org.sonar.squid.measures.MetricDef

aggregateIfThereIsAlreadyAValue

public boolean aggregateIfThereIsAlreadyAValue()
Specified by:
aggregateIfThereIsAlreadyAValue in interface org.sonar.squid.measures.MetricDef

isThereAggregationFormula

public boolean isThereAggregationFormula()
Specified by:
isThereAggregationFormula in interface org.sonar.squid.measures.MetricDef

getCalculatedMetricFormula

public org.sonar.squid.measures.CalculatedMetricFormula getCalculatedMetricFormula()
Specified by:
getCalculatedMetricFormula in interface org.sonar.squid.measures.MetricDef


Copyright © 2012 SonarSource. All Rights Reserved.