Remove redundant modifiers from interfaces' methods
Change-Id: I64766b8ad8818fbd666cfd960f4460eb5488aa04
This commit is contained in:
parent
dfcc5cd451
commit
cbc52bd366
@ -32,7 +32,7 @@ public interface GerritApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements GerritApi {
|
||||
class NotImplemented implements GerritApi {
|
||||
@Override
|
||||
public Accounts accounts() {
|
||||
throw new NotImplementedException();
|
||||
|
@ -59,7 +59,7 @@ public interface AccountApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements AccountApi {
|
||||
class NotImplemented implements AccountApi {
|
||||
@Override
|
||||
public AccountInfo get() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -75,7 +75,7 @@ public interface Accounts {
|
||||
*
|
||||
* @see #suggestAccounts()
|
||||
*/
|
||||
public abstract class SuggestAccountsRequest {
|
||||
abstract class SuggestAccountsRequest {
|
||||
private String query;
|
||||
private int limit;
|
||||
|
||||
@ -116,7 +116,7 @@ public interface Accounts {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements Accounts {
|
||||
class NotImplemented implements Accounts {
|
||||
@Override
|
||||
public AccountApi id(String id) throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -26,7 +26,7 @@ public interface GpgKeyApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
*/
|
||||
public class NotImplemented implements GpgKeyApi {
|
||||
class NotImplemented implements GpgKeyApi {
|
||||
@Override
|
||||
public GpgKeyInfo get() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -157,7 +157,7 @@ public interface ChangeApi {
|
||||
ChangeInfo check() throws RestApiException;
|
||||
ChangeInfo check(FixInput fix) throws RestApiException;
|
||||
|
||||
public abstract class SuggestedReviewersRequest {
|
||||
abstract class SuggestedReviewersRequest {
|
||||
private String query;
|
||||
private int limit;
|
||||
|
||||
@ -186,7 +186,7 @@ public interface ChangeApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements ChangeApi {
|
||||
class NotImplemented implements ChangeApi {
|
||||
@Override
|
||||
public String id() {
|
||||
throw new NotImplementedException();
|
||||
|
@ -64,7 +64,7 @@ public interface Changes {
|
||||
QueryRequest query();
|
||||
QueryRequest query(String query);
|
||||
|
||||
public abstract class QueryRequest {
|
||||
abstract class QueryRequest {
|
||||
private String query;
|
||||
private int limit;
|
||||
private int start;
|
||||
@ -140,7 +140,7 @@ public interface Changes {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements Changes {
|
||||
class NotImplemented implements Changes {
|
||||
@Override
|
||||
public ChangeApi id(int id) throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -25,7 +25,7 @@ public interface CommentApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements CommentApi {
|
||||
class NotImplemented implements CommentApi {
|
||||
@Override
|
||||
public CommentInfo get() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -26,7 +26,7 @@ public interface DraftApi extends CommentApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented extends CommentApi.NotImplemented
|
||||
class NotImplemented extends CommentApi.NotImplemented
|
||||
implements DraftApi {
|
||||
@Override
|
||||
public CommentInfo update(DraftInput in) throws RestApiException {
|
||||
|
@ -40,7 +40,7 @@ public interface FileApi {
|
||||
*/
|
||||
DiffRequest diffRequest() throws RestApiException;
|
||||
|
||||
public abstract class DiffRequest {
|
||||
abstract class DiffRequest {
|
||||
private String base;
|
||||
private Integer context;
|
||||
private Boolean intraline;
|
||||
@ -89,7 +89,7 @@ public interface FileApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements FileApi {
|
||||
class NotImplemented implements FileApi {
|
||||
@Override
|
||||
public BinaryResult content() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -75,7 +75,7 @@ public interface RevisionApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements RevisionApi {
|
||||
class NotImplemented implements RevisionApi {
|
||||
@Override
|
||||
public void delete() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -26,7 +26,7 @@ public interface Config {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements Config {
|
||||
class NotImplemented implements Config {
|
||||
@Override
|
||||
public Server server() {
|
||||
throw new NotImplementedException();
|
||||
|
@ -27,7 +27,7 @@ public interface Server {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements Server {
|
||||
class NotImplemented implements Server {
|
||||
@Override
|
||||
public String getVersion() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -51,7 +51,7 @@ public interface Groups {
|
||||
/** @return new request for listing groups. */
|
||||
ListRequest list();
|
||||
|
||||
public abstract class ListRequest {
|
||||
abstract class ListRequest {
|
||||
private final EnumSet<ListGroupsOption> options =
|
||||
EnumSet.noneOf(ListGroupsOption.class);
|
||||
private final List<String> projects = new ArrayList<>();
|
||||
|
@ -34,7 +34,7 @@ public interface BranchApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements BranchApi {
|
||||
class NotImplemented implements BranchApi {
|
||||
@Override
|
||||
public BranchApi create(BranchInput in) throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -26,7 +26,7 @@ public interface ChildProjectApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements ChildProjectApi {
|
||||
class NotImplemented implements ChildProjectApi {
|
||||
@Override
|
||||
public ProjectInfo get() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -31,7 +31,7 @@ public interface ProjectApi {
|
||||
ListRefsRequest<BranchInfo> branches();
|
||||
ListRefsRequest<TagInfo> tags();
|
||||
|
||||
public abstract class ListRefsRequest<T extends RefInfo> {
|
||||
abstract class ListRefsRequest<T extends RefInfo> {
|
||||
protected int limit;
|
||||
protected int start;
|
||||
protected String substring;
|
||||
@ -108,7 +108,7 @@ public interface ProjectApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements ProjectApi {
|
||||
class NotImplemented implements ProjectApi {
|
||||
@Override
|
||||
public ProjectApi create() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -60,7 +60,7 @@ public interface Projects {
|
||||
|
||||
ListRequest list();
|
||||
|
||||
public abstract class ListRequest {
|
||||
abstract class ListRequest {
|
||||
public enum FilterType {
|
||||
CODE, PARENT_CANDIDATES, PERMISSIONS, ALL
|
||||
}
|
||||
@ -175,7 +175,7 @@ public interface Projects {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements Projects {
|
||||
class NotImplemented implements Projects {
|
||||
@Override
|
||||
public ProjectApi name(String name) throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -24,7 +24,7 @@ public interface TagApi {
|
||||
* A default implementation which allows source compatibility
|
||||
* when adding new methods to the interface.
|
||||
**/
|
||||
public class NotImplemented implements TagApi {
|
||||
class NotImplemented implements TagApi {
|
||||
@Override
|
||||
public TagInfo get() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
@ -17,7 +17,7 @@ package com.google.gerrit.extensions.systemstatus;
|
||||
/** Exports current server information to an extension. */
|
||||
public interface ServerInformation {
|
||||
/** Current state of the server. */
|
||||
public enum State {
|
||||
enum State {
|
||||
/**
|
||||
* The server is starting up, and network connections are not yet being
|
||||
* accepted. Plugins or extensions starting during this time are starting
|
||||
|
@ -22,7 +22,7 @@ import java.util.List;
|
||||
|
||||
@ExtensionPoint
|
||||
public interface TopMenu {
|
||||
public class MenuEntry {
|
||||
class MenuEntry {
|
||||
public final String name;
|
||||
public final List<MenuItem> items;
|
||||
|
||||
|
@ -32,7 +32,7 @@ public interface UiAction<R extends RestResource> extends RestView<R> {
|
||||
Description getDescription(R resource);
|
||||
|
||||
/** Describes an action invokable through the web interface. */
|
||||
public static class Description {
|
||||
class Description {
|
||||
private String method;
|
||||
private String id;
|
||||
private String label;
|
||||
|
@ -24,7 +24,7 @@ public interface WebLink {
|
||||
/**
|
||||
* Class that holds target defaults for WebLink anchors.
|
||||
*/
|
||||
public static class Target {
|
||||
class Target {
|
||||
/**
|
||||
* Opens the link in a new window or tab
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@ import com.google.gwt.resources.client.DataResource.DoNotEmbed;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
|
||||
public interface ClippyResources extends ClientBundle {
|
||||
public static final ClippyResources I = GWT.create(ClippyResources.class);
|
||||
ClippyResources I = GWT.create(ClippyResources.class);
|
||||
|
||||
@Source("clippy.css")
|
||||
ClippyCss css();
|
||||
|
@ -18,7 +18,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.i18n.client.Constants;
|
||||
|
||||
interface CopyableLabelText extends Constants {
|
||||
final CopyableLabelText I = GWT.create(CopyableLabelText.class);
|
||||
CopyableLabelText I = GWT.create(CopyableLabelText.class);
|
||||
|
||||
String tooltip();
|
||||
String copied();
|
||||
|
@ -18,7 +18,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.i18n.client.Constants;
|
||||
|
||||
public interface KeyConstants extends Constants {
|
||||
public static final KeyConstants I = GWT.create(KeyConstants.class);
|
||||
KeyConstants I = GWT.create(KeyConstants.class);
|
||||
|
||||
String applicationSection();
|
||||
String showHelp();
|
||||
|
@ -18,7 +18,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
|
||||
public interface KeyResources extends ClientBundle {
|
||||
public static final KeyResources I = GWT.create(KeyResources.class);
|
||||
KeyResources I = GWT.create(KeyResources.class);
|
||||
|
||||
@Source("key.css")
|
||||
KeyCss css();
|
||||
|
@ -18,7 +18,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
|
||||
public interface ProgressResources extends ClientBundle {
|
||||
public static final ProgressResources I = GWT.create(ProgressResources.class);
|
||||
ProgressResources I = GWT.create(ProgressResources.class);
|
||||
|
||||
@Source("progress.css")
|
||||
ProgressCss css();
|
||||
|
@ -23,7 +23,7 @@ import com.google.gwt.user.client.ui.UIObject;
|
||||
/** Displays custom tooltip message below an element. */
|
||||
public class Tooltip {
|
||||
interface Resources extends ClientBundle {
|
||||
final Resources I = GWT.create(Resources.class);
|
||||
Resources I = GWT.create(Resources.class);
|
||||
|
||||
@Source("tooltip.css")
|
||||
Css css();
|
||||
|
@ -18,7 +18,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.i18n.client.Constants;
|
||||
|
||||
public interface CommonConstants extends Constants {
|
||||
public static final CommonConstants C = GWT.create(CommonConstants.class);
|
||||
CommonConstants C = GWT.create(CommonConstants.class);
|
||||
|
||||
String inTheFuture();
|
||||
String month();
|
||||
|
@ -18,7 +18,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.i18n.client.Messages;
|
||||
|
||||
public interface CommonMessages extends Messages {
|
||||
public static final CommonMessages M = GWT.create(CommonMessages.class);
|
||||
CommonMessages M = GWT.create(CommonMessages.class);
|
||||
|
||||
String secondsAgo(long seconds);
|
||||
String minutesAgo(long minutes);
|
||||
|
@ -19,7 +19,7 @@ import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
|
||||
public interface AdminResources extends ClientBundle {
|
||||
public static final AdminResources I = GWT.create(AdminResources.class);
|
||||
AdminResources I = GWT.create(AdminResources.class);
|
||||
|
||||
@Source("admin.css")
|
||||
AdminCss css();
|
||||
|
@ -19,9 +19,9 @@ import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface Resources extends ClientBundle {
|
||||
public static final Resources I = GWT.create(Resources.class);
|
||||
final ChangeConstants C = GWT.create(ChangeConstants.class);
|
||||
final ChangeMessages M = GWT.create(ChangeMessages.class);
|
||||
Resources I = GWT.create(Resources.class);
|
||||
ChangeConstants C = GWT.create(ChangeConstants.class);
|
||||
ChangeMessages M = GWT.create(ChangeMessages.class);
|
||||
|
||||
@Source("common.css") Style style();
|
||||
|
||||
|
@ -20,7 +20,7 @@ import com.google.gwt.resources.client.ImageResource;
|
||||
|
||||
/** Resources used by diff. */
|
||||
interface Resources extends ClientBundle {
|
||||
final Resources I = GWT.create(Resources.class);
|
||||
Resources I = GWT.create(Resources.class);
|
||||
|
||||
@Source("CommentBox.css") CommentBox.Style style();
|
||||
@Source("Scrollbar.css") Scrollbar.Style scrollbarStyle();
|
||||
|
@ -18,7 +18,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.i18n.client.Constants;
|
||||
|
||||
interface EditConstants extends Constants {
|
||||
final EditConstants I = GWT.create(EditConstants.class);
|
||||
EditConstants I = GWT.create(EditConstants.class);
|
||||
|
||||
String closeUnsavedChanges();
|
||||
String cancelUnsavedChanges();
|
||||
|
@ -18,7 +18,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.i18n.client.Constants;
|
||||
|
||||
public interface RpcConstants extends Constants {
|
||||
public static final RpcConstants C = GWT.create(RpcConstants.class);
|
||||
RpcConstants C = GWT.create(RpcConstants.class);
|
||||
|
||||
String errorServerUnavailable();
|
||||
String errorRemoteJsonException();
|
||||
|
@ -21,7 +21,7 @@ import com.google.gwt.resources.client.DataResource.DoNotEmbed;
|
||||
import com.google.gwt.resources.client.ExternalTextResource;
|
||||
|
||||
interface Lib extends ClientBundle {
|
||||
final Lib I = GWT.create(Lib.class);
|
||||
Lib I = GWT.create(Lib.class);
|
||||
|
||||
@Source("cm.css")
|
||||
ExternalTextResource css();
|
||||
|
@ -20,7 +20,7 @@ import com.google.gwt.resources.client.DataResource;
|
||||
import com.google.gwt.resources.client.DataResource.DoNotEmbed;
|
||||
|
||||
public interface Modes extends ClientBundle {
|
||||
public static final Modes I = GWT.create(Modes.class);
|
||||
Modes I = GWT.create(Modes.class);
|
||||
|
||||
@Source("apl.js") @DoNotEmbed DataResource apl();
|
||||
@Source("asciiarmor.js") @DoNotEmbed DataResource asciiarmor();
|
||||
|
@ -19,7 +19,7 @@ import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.ExternalTextResource;
|
||||
|
||||
public interface Themes extends ClientBundle {
|
||||
public static final Themes I = GWT.create(Themes.class);
|
||||
Themes I = GWT.create(Themes.class);
|
||||
|
||||
@Source("eclipse.css") ExternalTextResource eclipse();
|
||||
@Source("elegant.css") ExternalTextResource elegant();
|
||||
|
@ -23,7 +23,7 @@ public interface EmailExpander {
|
||||
|
||||
String expand(String user);
|
||||
|
||||
public static class None implements EmailExpander {
|
||||
class None implements EmailExpander {
|
||||
public static final None INSTANCE = new None();
|
||||
|
||||
public static boolean canHandle(final String fmt) {
|
||||
@ -44,7 +44,7 @@ public interface EmailExpander {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Simple implements EmailExpander {
|
||||
class Simple implements EmailExpander {
|
||||
private static final String PLACEHOLDER = "{0}";
|
||||
|
||||
public static boolean canHandle(final String fmt) {
|
||||
|
@ -24,7 +24,7 @@ import java.util.Set;
|
||||
* the presence of a user in a particular group.
|
||||
*/
|
||||
public interface GroupMembership {
|
||||
public static final GroupMembership EMPTY =
|
||||
GroupMembership EMPTY =
|
||||
new ListGroupMembership(Collections.<AccountGroup.UUID>emptySet());
|
||||
|
||||
/**
|
||||
|
@ -32,6 +32,6 @@ public interface AccountExternalIdCreator {
|
||||
*
|
||||
* @return a list of external identifiers, or an empty list.
|
||||
*/
|
||||
public List<AccountExternalId> create(Account.Id id, String username,
|
||||
List<AccountExternalId> create(Account.Id id, String username,
|
||||
String email);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ public interface PersistentCache {
|
||||
|
||||
DiskStats diskStats();
|
||||
|
||||
public static class DiskStats {
|
||||
class DiskStats {
|
||||
private final long size;
|
||||
private final long space;
|
||||
private final long hitCount;
|
||||
|
@ -23,7 +23,7 @@ import org.eclipse.jgit.lib.Repository;
|
||||
|
||||
/** Cache for mergeability of commits into destination branches. */
|
||||
public interface MergeabilityCache {
|
||||
public static class NotImplemented implements MergeabilityCache {
|
||||
class NotImplemented implements MergeabilityCache {
|
||||
@Override
|
||||
public boolean get(ObjectId commit, Ref intoRef, SubmitType submitType,
|
||||
String mergeStrategy, Branch.NameKey dest, Repository repo) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
package com.google.gerrit.server.git;
|
||||
|
||||
public interface QueueProvider {
|
||||
public static enum QueueType {
|
||||
enum QueueType {
|
||||
INTERACTIVE, BATCH
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public interface EmailTokenVerifier {
|
||||
ParsedToken decode(String tokenString) throws InvalidTokenException;
|
||||
|
||||
/** Exception thrown when a token does not parse correctly. */
|
||||
public static class InvalidTokenException extends Exception {
|
||||
class InvalidTokenException extends Exception {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public InvalidTokenException() {
|
||||
@ -52,7 +52,7 @@ public interface EmailTokenVerifier {
|
||||
}
|
||||
|
||||
/** Pair returned from decode to provide the data used during encode. */
|
||||
public static class ParsedToken {
|
||||
class ParsedToken {
|
||||
private final Account.Id accountId;
|
||||
private final String emailAddress;
|
||||
|
||||
|
@ -74,7 +74,7 @@ public interface PluginContentScanner {
|
||||
* provided by a plugin to extend an existing
|
||||
* extension point in Gerrit.
|
||||
*/
|
||||
public static class ExtensionMetaData {
|
||||
class ExtensionMetaData {
|
||||
public final String className;
|
||||
public final String annotationValue;
|
||||
|
||||
|
@ -37,7 +37,7 @@ public interface ServerPluginProvider {
|
||||
/**
|
||||
* Descriptor of the Plugin that ServerPluginProvider has to load.
|
||||
*/
|
||||
public class PluginDescription {
|
||||
class PluginDescription {
|
||||
public final PluginUser user;
|
||||
public final String canonicalUrl;
|
||||
public final Path dataDir;
|
||||
|
@ -29,7 +29,7 @@ public interface OutgoingEmailValidationListener {
|
||||
/**
|
||||
* Arguments supplied to validateOutgoingEmail.
|
||||
*/
|
||||
public static class Args {
|
||||
class Args {
|
||||
// in arguments
|
||||
public String messageClass;
|
||||
|
||||
|
@ -27,7 +27,7 @@ import java.lang.annotation.Target;
|
||||
@Target({ElementType.TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface CommandMetaData {
|
||||
public enum Mode {
|
||||
enum Mode {
|
||||
MASTER, MASTER_OR_SLAVE;
|
||||
public boolean isSupported(boolean slaveMode) {
|
||||
return this == MASTER_OR_SLAVE || !slaveMode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user