Changed header template
This commit is contained in:
@ -1,12 +0,0 @@
|
|||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package net.sourceforge.pmd.lang.java.metrics;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public @interface AbstractEntityHandler {
|
|
||||||
|
|
||||||
}
|
|
@ -13,7 +13,7 @@ import net.sourceforge.pmd.lang.java.ast.ASTMethodOrConstructorDeclaration;
|
|||||||
/**
|
/**
|
||||||
* Base class for metrics. Metric objects encapsulate the computational logic required to compute a metric from a PackageStats.
|
* Base class for metrics. Metric objects encapsulate the computational logic required to compute a metric from a PackageStats.
|
||||||
*
|
*
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractMetric {
|
public abstract class AbstractMetric {
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import net.sourceforge.pmd.lang.java.metrics.OperationSignature.Role;
|
|||||||
import net.sourceforge.pmd.lang.java.metrics.Signature.Visibility;
|
import net.sourceforge.pmd.lang.java.metrics.Signature.Visibility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AtfdMetric extends AbstractMetric implements ClassMetric, OperationMetric {
|
public class AtfdMetric extends AbstractMetric implements ClassMetric, OperationMetric {
|
||||||
|
@ -6,7 +6,7 @@ package net.sourceforge.pmd.lang.java.metrics;
|
|||||||
import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration;
|
import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface ClassMetric extends Metric {
|
public interface ClassMetric extends Metric {
|
||||||
|
@ -8,9 +8,9 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ClassStats {
|
public class ClassStats {
|
||||||
private Map<OperationSignature, List<String>> m_operations = new HashMap<>();
|
private Map<OperationSignature, List<String>> operations = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
package net.sourceforge.pmd.lang.java.metrics;
|
package net.sourceforge.pmd.lang.java.metrics;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class FieldSigMask extends SigMask<FieldSignature> {
|
public class FieldSigMask extends SigMask<FieldSignature> {
|
||||||
|
@ -6,8 +6,7 @@ package net.sourceforge.pmd.lang.java.metrics;
|
|||||||
import net.sourceforge.pmd.lang.java.ast.ASTFieldDeclaration;
|
import net.sourceforge.pmd.lang.java.ast.ASTFieldDeclaration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class FieldSignature extends Signature {
|
public class FieldSignature extends Signature {
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
package net.sourceforge.pmd.lang.java.metrics;
|
package net.sourceforge.pmd.lang.java.metrics;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface Metric {
|
public interface Metric {
|
||||||
|
@ -9,7 +9,7 @@ import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration;
|
|||||||
import net.sourceforge.pmd.lang.java.ast.ASTMethodOrConstructorDeclaration;
|
import net.sourceforge.pmd.lang.java.ast.ASTMethodOrConstructorDeclaration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Metrics {
|
public class Metrics {
|
||||||
|
@ -8,7 +8,7 @@ import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration;
|
|||||||
import net.sourceforge.pmd.lang.java.ast.ASTMethodOrConstructorDeclaration;
|
import net.sourceforge.pmd.lang.java.ast.ASTMethodOrConstructorDeclaration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface OperationMetric extends Metric {
|
public interface OperationMetric extends Metric {
|
||||||
|
@ -11,7 +11,7 @@ import java.util.Set;
|
|||||||
import net.sourceforge.pmd.lang.java.metrics.OperationSignature.Role;
|
import net.sourceforge.pmd.lang.java.metrics.OperationSignature.Role;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class OperationSigMask extends SigMask<OperationSignature> {
|
public class OperationSigMask extends SigMask<OperationSignature> {
|
||||||
|
@ -7,7 +7,7 @@ import net.sourceforge.pmd.lang.java.ast.ASTConstructorDeclaration;
|
|||||||
import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration;
|
import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class OperationSignature extends Signature {
|
public class OperationSignature extends Signature {
|
||||||
|
@ -8,13 +8,13 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PackageStats {
|
public class PackageStats {
|
||||||
|
|
||||||
private Map<String, PackageStats> m_subPackages = new HashMap<>();
|
private Map<String, PackageStats> subPackages = new HashMap<>();
|
||||||
private Map<String, ClassStats> m_classes = new HashMap<>();
|
private Map<String, ClassStats> classes = new HashMap<>();
|
||||||
|
|
||||||
public PackageStats getSubPackage(String[] qname, int index) {
|
public PackageStats getSubPackage(String[] qname, int index) {
|
||||||
// ...
|
// ...
|
||||||
@ -23,7 +23,7 @@ public class PackageStats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ClassStats getClassStats(String name) {
|
public ClassStats getClassStats(String name) {
|
||||||
return m_classes.get(name);
|
return classes.get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasMatchingSig(String qname, OperationSigMask sigMask) {
|
public boolean hasMatchingSig(String qname, OperationSigMask sigMask) {
|
||||||
|
@ -10,7 +10,7 @@ import java.util.Set;
|
|||||||
import net.sourceforge.pmd.lang.java.metrics.Signature.Visibility;
|
import net.sourceforge.pmd.lang.java.metrics.Signature.Visibility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class SigMask<T extends Signature> {
|
public abstract class SigMask<T extends Signature> {
|
||||||
|
@ -6,7 +6,7 @@ package net.sourceforge.pmd.lang.java.metrics;
|
|||||||
import net.sourceforge.pmd.lang.java.ast.AbstractJavaAccessNode;
|
import net.sourceforge.pmd.lang.java.ast.AbstractJavaAccessNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Signature {
|
public class Signature {
|
||||||
|
@ -6,7 +6,7 @@ package net.sourceforge.pmd.lang.java.metrics;
|
|||||||
import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration;
|
import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Clément Fournier (clement.fournier@insa-rennes.fr)
|
* @author Clément Fournier
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class WmcMetric extends AbstractMetric implements ClassMetric {
|
public class WmcMetric extends AbstractMetric implements ClassMetric {
|
||||||
|
Reference in New Issue
Block a user