Skip to content

Commit

Permalink
Remove redundant modifiers in interfaces (bazelbuild#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
Riggs333 authored and Godin committed Oct 18, 2018
1 parent 1d0840f commit fbba3b5
Show file tree
Hide file tree
Showing 31 changed files with 95 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ public void logExeption(final Exception ex) {
* @param ex
* exception to log
*/
public void logExeption(Exception ex);
void logExeption(Exception ex);

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,15 @@ public interface IAgentOutput {
* @throws Exception
* in case startup fails
*/
public void startup(final AgentOptions options, final RuntimeData data)
throws Exception;
void startup(AgentOptions options, RuntimeData data) throws Exception;

/**
* Shutdown the agent controller and clean up any resources it has created.
*
* @throws Exception
* in case shutdown fails
*/
public void shutdown() throws Exception;
void shutdown() throws Exception;

/**
* Write all execution data in the runtime to a location determined by the
Expand All @@ -53,6 +52,6 @@ public void startup(final AgentOptions options, final RuntimeData data)
* @throws IOException
* in case writing fails
*/
public void writeExecutionData(boolean reset) throws IOException;
void writeExecutionData(boolean reset) throws IOException;

}
4 changes: 2 additions & 2 deletions org.jacoco.ant/src/org/jacoco/ant/CoverageTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private interface TaskEnhancer {
* @return <code>true</code> if this enhancer is capable of enhancing
* the requested task type
*/
public boolean supportsTask(String taskname);
boolean supportsTask(String taskname);

/**
* Attempt to enhance the supplied task with coverage information. This
Expand All @@ -192,6 +192,6 @@ private interface TaskEnhancer {
* Thrown if this enhancer can handle this type of task, but
* this instance can not be enhanced for some reason.
*/
public void enhanceTask(Task task) throws BuildException;
void enhanceTask(Task task) throws BuildException;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
public interface IPerfOutput {

/** Indicator for no reference time given */
public static final long NO_REFERENCE = Long.MIN_VALUE;
long NO_REFERENCE = Long.MIN_VALUE;

/**
* Reports the result of a time measurement with a optional reference time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public interface IPerfScenario {
*
* @param output
*/
public void run(IPerfOutput output) throws Exception;
void run(IPerfOutput output) throws Exception;

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public interface IBundleCoverage extends ICoverageNode {
*
* @return all packages
*/
public Collection<IPackageCoverage> getPackages();
Collection<IPackageCoverage> getPackages();

}
16 changes: 8 additions & 8 deletions org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface IClassCoverage extends ISourceNode {
*
* @return class identifier
*/
public long getId();
long getId();

/**
* Returns if the the analyzed class does match the execution data provided.
Expand All @@ -37,49 +37,49 @@ public interface IClassCoverage extends ISourceNode {
* @return <code>true</code> if this class does not match to the provided
* execution data.
*/
public boolean isNoMatch();
boolean isNoMatch();

/**
* Returns the VM signature of the class.
*
* @return VM signature of the class (may be <code>null</code>)
*/
public String getSignature();
String getSignature();

/**
* Returns the VM name of the superclass.
*
* @return VM name of the super class (may be <code>null</code>, i.e.
* <code>java/lang/Object</code>)
*/
public String getSuperName();
String getSuperName();

/**
* Returns the VM names of implemented/extended interfaces.
*
* @return VM names of implemented/extended interfaces
*/
public String[] getInterfaceNames();
String[] getInterfaceNames();

/**
* Returns the VM name of the package this class belongs to.
*
* @return VM name of the package
*/
public String getPackageName();
String getPackageName();

/**
* Returns the optional name of the corresponding source file.
*
* @return name of the corresponding source file
*/
public String getSourceFileName();
String getSourceFileName();

/**
* Returns the methods included in this class.
*
* @return methods of this class
*/
public Collection<IMethodCoverage> getMethods();
Collection<IMethodCoverage> getMethods();

}
24 changes: 12 additions & 12 deletions org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public interface ICounter {
/**
* Different values provided by a counter.
*/
public enum CounterValue {
enum CounterValue {

/** Total number of items */
TOTALCOUNT,
Expand All @@ -41,22 +41,22 @@ public enum CounterValue {
/**
* Status flag for no items (value is 0x00).
*/
public static final int EMPTY = 0x00;
int EMPTY = 0x00;

/**
* Status flag when all items are not covered (value is 0x01).
*/
public static final int NOT_COVERED = 0x01;
int NOT_COVERED = 0x01;

/**
* Status flag when all items are covered (value is 0x02).
*/
public static final int FULLY_COVERED = 0x02;
int FULLY_COVERED = 0x02;

/**
* Status flag when items are partly covered (value is 0x03).
*/
public static final int PARTLY_COVERED = NOT_COVERED | FULLY_COVERED;
int PARTLY_COVERED = NOT_COVERED | FULLY_COVERED;

/**
* Returns the counter value of the given type.
Expand All @@ -65,44 +65,44 @@ public enum CounterValue {
* value type to return
* @return counter value
*/
public double getValue(CounterValue value);
double getValue(CounterValue value);

/**
* Returns the total count of items.
*
* @return total count of items
*/
public int getTotalCount();
int getTotalCount();

/**
* Returns the count of covered items.
*
* @return count of covered items
*/
public int getCoveredCount();
int getCoveredCount();

/**
* Returns the count of missed items.
*
* @return count of missed items
*/
public int getMissedCount();
int getMissedCount();

/**
* Calculates the ratio of covered to total count items. If total count
* items is 0 this method returns NaN.
*
* @return ratio of covered to total count items
*/
public double getCoveredRatio();
double getCoveredRatio();

/**
* Calculates the ratio of missed to total count items. If total count items
* is 0 this method returns NaN.
*
* @return ratio of missed to total count items
*/
public double getMissedRatio();
double getMissedRatio();

/**
* Returns the coverage status of this counter.
Expand All @@ -114,6 +114,6 @@ public enum CounterValue {
*
* @return status of this line
*/
public int getStatus();
int getStatus();

}
24 changes: 12 additions & 12 deletions org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public interface ICoverageNode {
/**
* Type of a Java element represented by a {@link ICoverageNode} instance.
*/
public enum ElementType {
enum ElementType {

/** Method */
METHOD,
Expand All @@ -45,7 +45,7 @@ public enum ElementType {
/**
* Different counter types supported by JaCoCo.
*/
public enum CounterEntity {
enum CounterEntity {

/** Counter for instructions */
INSTRUCTION,
Expand All @@ -71,56 +71,56 @@ public enum CounterEntity {
*
* @return type of this node
*/
public abstract ElementType getElementType();
ElementType getElementType();

/**
* Returns the name of this node.
*
* @return name of this node
*/
public String getName();
String getName();

/**
* Returns the counter for byte code instructions.
*
* @return counter for instructions
*/
public abstract ICounter getInstructionCounter();
ICounter getInstructionCounter();

/**
* Returns the counter for branches.
*
* @return counter for branches
*/
public ICounter getBranchCounter();
ICounter getBranchCounter();

/**
* Returns the counter for lines.
*
* @return counter for lines
*/
public ICounter getLineCounter();
ICounter getLineCounter();

/**
* Returns the counter for cyclomatic complexity.
*
* @return counter for complexity
*/
public ICounter getComplexityCounter();
ICounter getComplexityCounter();

/**
* Returns the counter for methods.
*
* @return counter for methods
*/
public ICounter getMethodCounter();
ICounter getMethodCounter();

/**
* Returns the counter for classes.
*
* @return counter for classes
*/
public ICounter getClassCounter();
ICounter getClassCounter();

/**
* Generic access to the the counters.
Expand All @@ -129,7 +129,7 @@ public enum CounterEntity {
* entity we're we want to have the counter for
* @return counter for the given entity
*/
public ICounter getCounter(CounterEntity entity);
ICounter getCounter(CounterEntity entity);

/**
* Creates a plain copy of this node. While {@link ICoverageNode}
Expand All @@ -139,6 +139,6 @@ public enum CounterEntity {
*
* @return copy with counters only
*/
public ICoverageNode getPlainCopy();
ICoverageNode getPlainCopy();

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public interface ICoverageVisitor {
* @param coverage
* coverage data for a class
*/
public void visitCoverage(IClassCoverage coverage);
void visitCoverage(IClassCoverage coverage);

}
6 changes: 3 additions & 3 deletions org.jacoco.core/src/org/jacoco/core/analysis/ILine.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public interface ILine {
*
* @return instruction counter
*/
public ICounter getInstructionCounter();
ICounter getInstructionCounter();

/**
* Returns the branches counter for this line.
*
* @return branches counter
*/
public ICounter getBranchCounter();
ICounter getBranchCounter();

/**
* Returns the coverage status of this line, calculated from the
Expand All @@ -42,6 +42,6 @@ public interface ILine {
*
* @return status of this line
*/
public int getStatus();
int getStatus();

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ public interface IMethodCoverage extends ISourceNode {
*
* @return descriptor
*/
public String getDesc();
String getDesc();

/**
* Returns the generic signature of the method if defined.
*
* @return generic signature or <code>null</code>
*/
public String getSignature();
String getSignature();

}
Loading

0 comments on commit fbba3b5

Please sign in to comment.