提交 22b13104 编写于 作者: C Craig P. Motlin 提交者: Kohsuke Kawaguchi

Remove unnecessary interface modifiers.

上级 b8673633
......@@ -53,5 +53,5 @@ public interface ExtensionPoint {
*/
@Target(TYPE)
@Retention(RUNTIME)
public @interface LegacyInstancesAreScopedToHudson {}
@interface LegacyInstancesAreScopedToHudson {}
}
......@@ -743,7 +743,7 @@ public final class FilePath implements Serializable {
*
* @see FilePath#act(FileCallable)
*/
public static interface FileCallable<T> extends Serializable {
public interface FileCallable<T> extends Serializable {
/**
* Performs the computational task on the node where the data is located.
*
......
......@@ -889,7 +889,7 @@ public abstract class Launcher {
/**
* Remoting interface of a remote process
*/
public static interface RemoteProcess {
public interface RemoteProcess {
int join() throws InterruptedException, IOException;
void kill() throws IOException, InterruptedException;
boolean isAlive() throws IOException, InterruptedException;
......
......@@ -47,7 +47,7 @@ public interface PluginStrategy extends ExtensionPoint {
* @param archive
* Either a directory that points to a pre-exploded plugin, or an hpi file, or an hpl file.
*/
public abstract PluginWrapper createPluginWrapper(File archive)
PluginWrapper createPluginWrapper(File archive)
throws IOException;
/**
......@@ -57,7 +57,7 @@ public interface PluginStrategy extends ExtensionPoint {
* This should be done after all the classloaders are constructed for all
* the plugins, so that dependencies can be properly loaded by plugins.
*/
public abstract void load(PluginWrapper wrapper) throws IOException;
void load(PluginWrapper wrapper) throws IOException;
/**
* Optionally start services provided by the plugin. Should be called
......@@ -65,7 +65,7 @@ public interface PluginStrategy extends ExtensionPoint {
*
* @param plugin
*/
public abstract void initializeComponents(PluginWrapper plugin);
void initializeComponents(PluginWrapper plugin);
/**
* Find components of the given type using the assigned strategy.
......@@ -76,5 +76,5 @@ public interface PluginStrategy extends ExtensionPoint {
* @return Sequence of components
* @since 1.400
*/
public abstract <T> List<ExtensionComponent<T>> findComponents(Class<T> type, Hudson hudson);
<T> List<ExtensionComponent<T>> findComponents(Class<T> type, Hudson hudson);
}
......@@ -52,5 +52,5 @@ public interface EnvironmentContributingAction extends Action {
* @param env
* Environment variables should be added to this map.
*/
public void buildEnvVars(AbstractBuild<?,?> build, EnvVars env);
void buildEnvVars(AbstractBuild<?, ?> build, EnvVars env);
}
......@@ -74,7 +74,7 @@ public interface Item extends PersistenceRoot, SearchableModelObject, AccessCont
/**
* Gets all the jobs that this {@link Item} contains as descendants.
*/
abstract Collection<? extends Job> getAllJobs();
Collection<? extends Job> getAllJobs();
/**
* Gets the name of the item.
......@@ -212,20 +212,20 @@ public interface Item extends PersistenceRoot, SearchableModelObject, AccessCont
* or {@link AbstractItem#getConfigFile()} to obtain the file
* to save the data.
*/
public void save() throws IOException;
void save() throws IOException;
/**
* Deletes this item.
*/
public void delete() throws IOException, InterruptedException;
public static final PermissionGroup PERMISSIONS = new PermissionGroup(Item.class,Messages._Item_Permissions_Title());
public static final Permission CREATE = new Permission(PERMISSIONS, "Create", null, Permission.CREATE, PermissionScope.ITEM_GROUP);
public static final Permission DELETE = new Permission(PERMISSIONS, "Delete", null, Permission.DELETE, PermissionScope.ITEM);
public static final Permission CONFIGURE = new Permission(PERMISSIONS, "Configure", null, Permission.CONFIGURE, PermissionScope.ITEM);
public static final Permission READ = new Permission(PERMISSIONS, "Read", null, Permission.READ, PermissionScope.ITEM);
public static final Permission EXTENDED_READ = new Permission(PERMISSIONS,"ExtendedRead", Messages._AbstractProject_ExtendedReadPermission_Description(), CONFIGURE, Boolean.getBoolean("hudson.security.ExtendedReadPermission"), new PermissionScope[]{PermissionScope.ITEM});
public static final Permission BUILD = new Permission(PERMISSIONS, "Build", Messages._AbstractProject_BuildPermission_Description(), Permission.UPDATE, PermissionScope.ITEM);
public static final Permission WORKSPACE = new Permission(PERMISSIONS, "Workspace", Messages._AbstractProject_WorkspacePermission_Description(), Permission.READ, PermissionScope.ITEM);
public static final Permission WIPEOUT = new Permission(PERMISSIONS, "WipeOut", Messages._AbstractProject_WipeOutPermission_Description(), null, Functions.isWipeOutPermissionEnabled(), new PermissionScope[]{PermissionScope.ITEM});
void delete() throws IOException, InterruptedException;
PermissionGroup PERMISSIONS = new PermissionGroup(Item.class,Messages._Item_Permissions_Title());
Permission CREATE = new Permission(PERMISSIONS, "Create", null, Permission.CREATE, PermissionScope.ITEM_GROUP);
Permission DELETE = new Permission(PERMISSIONS, "Delete", null, Permission.DELETE, PermissionScope.ITEM);
Permission CONFIGURE = new Permission(PERMISSIONS, "Configure", null, Permission.CONFIGURE, PermissionScope.ITEM);
Permission READ = new Permission(PERMISSIONS, "Read", null, Permission.READ, PermissionScope.ITEM);
Permission EXTENDED_READ = new Permission(PERMISSIONS,"ExtendedRead", Messages._AbstractProject_ExtendedReadPermission_Description(), CONFIGURE, Boolean.getBoolean("hudson.security.ExtendedReadPermission"), new PermissionScope[]{PermissionScope.ITEM});
Permission BUILD = new Permission(PERMISSIONS, "Build", Messages._AbstractProject_BuildPermission_Description(), Permission.UPDATE, PermissionScope.ITEM);
Permission WORKSPACE = new Permission(PERMISSIONS, "Workspace", Messages._AbstractProject_WorkspacePermission_Description(), Permission.READ, PermissionScope.ITEM);
Permission WIPEOUT = new Permission(PERMISSIONS, "WipeOut", Messages._AbstractProject_WipeOutPermission_Description(), null, Functions.isWipeOutPermissionEnabled(), new PermissionScope[]{PermissionScope.ITEM});
}
......@@ -57,7 +57,7 @@ public interface PermalinkProjectAction extends Action {
/**
* Permalink as a strategy pattern.
*/
public static abstract class Permalink {
abstract class Permalink {
/**
* String to be displayed in the UI, such as "Last successful build".
* The convention is to upper case the first letter.
......
......@@ -1353,7 +1353,7 @@ public class Queue extends ResourceController implements Saveable {
* Returns whether the new item should be scheduled.
* An action should return true if the associated task is 'different enough' to warrant a separate execution.
*/
public boolean shouldSchedule(List<Action> actions);
boolean shouldSchedule(List<Action> actions);
}
/**
......
......@@ -71,5 +71,5 @@ public interface SCMedItem extends BuildableItem {
*
* @since 1.345
*/
public PollingResult poll( TaskListener listener );
PollingResult poll(TaskListener listener);
}
......@@ -111,5 +111,5 @@ public interface TaskListener extends Serializable {
/**
* {@link TaskListener} that discards the output.
*/
public static final TaskListener NULL = new StreamTaskListener(new NullStream());
TaskListener NULL = new StreamTaskListener(new NullStream());
}
......@@ -136,5 +136,5 @@ public interface ViewGroup extends Saveable, ModelObject, AccessControlled {
* @see Actionable#getActions()
* @since 1.417
*/
public List<Action> getViewActions();
List<Action> getViewActions();
}
......@@ -40,7 +40,7 @@ public interface SearchIndex {
/**
* Empty set.
*/
static final SearchIndex EMPTY = new SearchIndex() {
SearchIndex EMPTY = new SearchIndex() {
public void find(String token, List<SearchItem> result) {
// no item to contribute
}
......
......@@ -212,7 +212,7 @@ public interface BuildStep {
* Use {@link Builder#all()} for read access, and use
* {@link Extension} for registration.
*/
public static final List<Descriptor<Builder>> BUILDERS = new DescriptorList<Builder>(Builder.class);
List<Descriptor<Builder>> BUILDERS = new DescriptorList<Builder>(Builder.class);
/**
* List of all installed publishers.
......@@ -228,12 +228,12 @@ public interface BuildStep {
* Use {@link Publisher#all()} for read access, and use
* {@link Extension} for registration.
*/
public static final PublisherList PUBLISHERS = new PublisherList();
PublisherList PUBLISHERS = new PublisherList();
/**
* List of publisher descriptor.
*/
public static final class PublisherList extends AbstractList<Descriptor<Publisher>> {
final class PublisherList extends AbstractList<Descriptor<Publisher>> {
/**
* {@link Descriptor}s are actually stored in here.
* Since {@link PublisherList} lives longer than {@link jenkins.model.Jenkins} we cannot directly use {@link ExtensionList}.
......
......@@ -53,5 +53,5 @@ public interface InvocationInterceptor {
* But the implementation may choose to skip calling the 'delegate' object, alter arguments,
* and alter the return value.
*/
public Object invoke(Object proxy, Method method, Object[] args, InvocationHandler delegate) throws Throwable;
Object invoke(Object proxy, Method method, Object[] args, InvocationHandler delegate) throws Throwable;
}
......@@ -307,7 +307,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
*
* @see OSProcess#act(ProcessCallable)
*/
public static interface ProcessCallable<T> extends Serializable {
public interface ProcessCallable<T> extends Serializable {
/**
* Performs the computational task on the node where the data is located.
*
......
......@@ -50,12 +50,12 @@ public interface VariableResolver<V> {
* Object referenced by the name.
* Null if not found.
*/
public abstract V resolve(String name);
V resolve(String name);
/**
* Empty resolver that always returns null.
*/
public static final VariableResolver NONE = new VariableResolver() {
VariableResolver NONE = new VariableResolver() {
public Object resolve(String name) {
return null;
}
......@@ -64,7 +64,7 @@ public interface VariableResolver<V> {
/**
* {@link VariableResolver} backed by a {@link Map}.
*/
public static final class ByMap<V> implements VariableResolver<V> {
final class ByMap<V> implements VariableResolver<V> {
private final Map<String,V> data;
public ByMap(Map<String, V> data) {
......@@ -79,7 +79,7 @@ public interface VariableResolver<V> {
/**
* Union of multiple {@link VariableResolver}.
*/
public static final class Union<V> implements VariableResolver<V> {
final class Union<V> implements VariableResolver<V> {
private final VariableResolver<? extends V>[] resolvers;
public Union(VariableResolver<? extends V>... resolvers) {
......
......@@ -48,7 +48,7 @@ BOOL WINAPI LookupAccountName(
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);*/
public boolean LookupAccountName(String lpSystemName, String lpAccountName,
boolean LookupAccountName(String lpSystemName, String lpAccountName,
byte[] Sid, IntByReference cbSid, char[] ReferencedDomainName,
IntByReference cchReferencedDomainName, PointerByReference peUse);
......@@ -62,7 +62,7 @@ BOOL WINAPI LookupAccountSid(
LPDWORD cchReferencedDomainName,
PSID_NAME_USE peUse
);*/
public boolean LookupAccountSid(String lpSystemName, byte[] Sid,
boolean LookupAccountSid(String lpSystemName, byte[] Sid,
char[] lpName, IntByReference cchName, char[] ReferencedDomainName,
IntByReference cchReferencedDomainName, PointerByReference peUse);
......@@ -71,14 +71,14 @@ BOOL ConvertSidToStringSid(
PSID Sid,
LPTSTR* StringSid
);*/
public boolean ConvertSidToStringSid(byte[] Sid, PointerByReference StringSid);
boolean ConvertSidToStringSid(byte[] Sid, PointerByReference StringSid);
/*
BOOL WINAPI ConvertStringSidToSid(
LPCTSTR StringSid,
PSID* Sid
);*/
public boolean ConvertStringSidToSid(String StringSid, PointerByReference Sid);
boolean ConvertStringSidToSid(String StringSid, PointerByReference Sid);
/*
SC_HANDLE WINAPI OpenSCManager(
......@@ -86,13 +86,13 @@ SC_HANDLE WINAPI OpenSCManager(
LPCTSTR lpDatabaseName,
DWORD dwDesiredAccess
);*/
public Pointer OpenSCManager(String lpMachineName, WString lpDatabaseName, int dwDesiredAccess);
Pointer OpenSCManager(String lpMachineName, WString lpDatabaseName, int dwDesiredAccess);
/*
BOOL WINAPI CloseServiceHandle(
SC_HANDLE hSCObject
);*/
public boolean CloseServiceHandle(Pointer hSCObject);
boolean CloseServiceHandle(Pointer hSCObject);
/*
SC_HANDLE WINAPI OpenService(
......@@ -100,7 +100,7 @@ SC_HANDLE WINAPI OpenService(
LPCTSTR lpServiceName,
DWORD dwDesiredAccess
);*/
public Pointer OpenService(Pointer hSCManager, String lpServiceName, int dwDesiredAccess);
Pointer OpenService(Pointer hSCManager, String lpServiceName, int dwDesiredAccess);
/*
BOOL WINAPI StartService(
......@@ -108,7 +108,7 @@ BOOL WINAPI StartService(
DWORD dwNumServiceArgs,
LPCTSTR* lpServiceArgVectors
);*/
public boolean StartService(Pointer hService, int dwNumServiceArgs, char[] lpServiceArgVectors);
boolean StartService(Pointer hService, int dwNumServiceArgs, char[] lpServiceArgVectors);
/*
BOOL WINAPI ControlService(
......@@ -116,20 +116,20 @@ BOOL WINAPI ControlService(
DWORD dwControl,
LPSERVICE_STATUS lpServiceStatus
);*/
public boolean ControlService(Pointer hService, int dwControl, SERVICE_STATUS lpServiceStatus);
boolean ControlService(Pointer hService, int dwControl, SERVICE_STATUS lpServiceStatus);
/*
BOOL WINAPI StartServiceCtrlDispatcher(
const SERVICE_TABLE_ENTRY* lpServiceTable
);*/
public boolean StartServiceCtrlDispatcher(Structure[] lpServiceTable);
boolean StartServiceCtrlDispatcher(Structure[] lpServiceTable);
/*
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandler(
LPCTSTR lpServiceName,
LPHANDLER_FUNCTION lpHandlerProc
);*/
public Pointer RegisterServiceCtrlHandler(String lpServiceName, Handler lpHandlerProc);
Pointer RegisterServiceCtrlHandler(String lpServiceName, Handler lpHandlerProc);
/*
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerEx(
......@@ -137,14 +137,14 @@ SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerEx(
LPHANDLER_FUNCTION_EX lpHandlerProc,
LPVOID lpContext
);*/
public Pointer RegisterServiceCtrlHandlerEx(String lpServiceName, HandlerEx lpHandlerProc, Pointer lpContext);
Pointer RegisterServiceCtrlHandlerEx(String lpServiceName, HandlerEx lpHandlerProc, Pointer lpContext);
/*
BOOL WINAPI SetServiceStatus(
SERVICE_STATUS_HANDLE hServiceStatus,
LPSERVICE_STATUS lpServiceStatus
);*/
public boolean SetServiceStatus(Pointer hServiceStatus, SERVICE_STATUS lpServiceStatus);
boolean SetServiceStatus(Pointer hServiceStatus, SERVICE_STATUS lpServiceStatus);
/*
SC_HANDLE WINAPI CreateService(
......@@ -162,7 +162,7 @@ SC_HANDLE WINAPI CreateService(
LPCTSTR lpServiceStartName,
LPCTSTR lpPassword
);*/
public Pointer CreateService(Pointer hSCManager, String lpServiceName, String lpDisplayName,
Pointer CreateService(Pointer hSCManager, String lpServiceName, String lpDisplayName,
int dwDesiredAccess, int dwServiceType, int dwStartType, int dwErrorControl,
String lpBinaryPathName, String lpLoadOrderGroup, IntByReference lpdwTagId,
String lpDependencies, String lpServiceStartName, String lpPassword);
......@@ -171,7 +171,7 @@ SC_HANDLE WINAPI CreateService(
BOOL WINAPI DeleteService(
SC_HANDLE hService
);*/
public boolean DeleteService(Pointer hService);
boolean DeleteService(Pointer hService);
/*
BOOL WINAPI ChangeServiceConfig2(
......@@ -179,7 +179,7 @@ BOOL WINAPI ChangeServiceConfig2(
DWORD dwInfoLevel,
LPVOID lpInfo
);*/
public boolean ChangeServiceConfig2(Pointer hService, int dwInfoLevel, ChangeServiceConfig2Info lpInfo);
boolean ChangeServiceConfig2(Pointer hService, int dwInfoLevel, ChangeServiceConfig2Info lpInfo);
/*
LONG WINAPI RegOpenKeyEx(
......@@ -189,7 +189,7 @@ LONG WINAPI RegOpenKeyEx(
REGSAM samDesired,
PHKEY phkResult
);*/
public int RegOpenKeyEx(int hKey, String lpSubKey, int ulOptions, int samDesired, IntByReference phkResult);
int RegOpenKeyEx(int hKey, String lpSubKey, int ulOptions, int samDesired, IntByReference phkResult);
/*
LONG WINAPI RegQueryValueEx(
......@@ -200,20 +200,20 @@ LONG WINAPI RegQueryValueEx(
LPBYTE lpData,
LPDWORD lpcbData
);*/
public int RegQueryValueEx(int hKey, String lpValueName, IntByReference lpReserved, IntByReference lpType, byte[] lpData, IntByReference lpcbData);
int RegQueryValueEx(int hKey, String lpValueName, IntByReference lpReserved, IntByReference lpType, byte[] lpData, IntByReference lpcbData);
/*
LONG WINAPI RegCloseKey(
HKEY hKey
);*/
public int RegCloseKey(int hKey);
int RegCloseKey(int hKey);
/*
LONG WINAPI RegDeleteValue(
HKEY hKey,
LPCTSTR lpValueName
);*/
public int RegDeleteValue(int hKey, String lpValueName);
int RegDeleteValue(int hKey, String lpValueName);
/*
LONG WINAPI RegSetValueEx(
......@@ -224,7 +224,7 @@ LONG WINAPI RegSetValueEx(
const BYTE* lpData,
DWORD cbData
);*/
public int RegSetValueEx(int hKey, String lpValueName, int Reserved, int dwType, byte[] lpData, int cbData);
int RegSetValueEx(int hKey, String lpValueName, int Reserved, int dwType, byte[] lpData, int cbData);
/*
LONG WINAPI RegCreateKeyEx(
......@@ -238,7 +238,7 @@ LONG WINAPI RegCreateKeyEx(
PHKEY phkResult,
LPDWORD lpdwDisposition
);*/
public int RegCreateKeyEx(int hKey, String lpSubKey, int Reserved, String lpClass, int dwOptions,
int RegCreateKeyEx(int hKey, String lpSubKey, int Reserved, String lpClass, int dwOptions,
int samDesired, WINBASE.SECURITY_ATTRIBUTES lpSecurityAttributes, IntByReference phkResult,
IntByReference lpdwDisposition);
......@@ -247,7 +247,7 @@ LONG WINAPI RegDeleteKey(
HKEY hKey,
LPCTSTR lpSubKey
);*/
public int RegDeleteKey(int hKey, String name);
int RegDeleteKey(int hKey, String name);
/*
LONG WINAPI RegEnumKeyEx(
......@@ -260,7 +260,7 @@ LONG WINAPI RegEnumKeyEx(
LPDWORD lpcClass,
PFILETIME lpftLastWriteTime
);*/
public int RegEnumKeyEx(int hKey, int dwIndex, char[] lpName, IntByReference lpcName, IntByReference reserved,
int RegEnumKeyEx(int hKey, int dwIndex, char[] lpName, IntByReference lpcName, IntByReference reserved,
char[] lpClass, IntByReference lpcClass, WINBASE.FILETIME lpftLastWriteTime);
/*
......@@ -274,7 +274,7 @@ LONG WINAPI RegEnumValue(
LPBYTE lpData,
LPDWORD lpcbData
);*/
public int RegEnumValue(int hKey, int dwIndex, char[] lpValueName, IntByReference lpcchValueName, IntByReference reserved,
int RegEnumValue(int hKey, int dwIndex, char[] lpValueName, IntByReference lpcchValueName, IntByReference reserved,
IntByReference lpType, byte[] lpData, IntByReference lpcbData);
interface SERVICE_MAIN_FUNCTION extends StdCallCallback {
......@@ -283,7 +283,7 @@ LONG WINAPI RegEnumValue(
DWORD dwArgc,
LPTSTR* lpszArgv
);*/
public void callback(int dwArgc, Pointer lpszArgv);
void callback(int dwArgc, Pointer lpszArgv);
}
interface Handler extends StdCallCallback {
......@@ -291,7 +291,7 @@ LONG WINAPI RegEnumValue(
VOID WINAPI Handler(
DWORD fdwControl
);*/
public void callback(int fdwControl);
void callback(int fdwControl);
}
interface HandlerEx extends StdCallCallback {
......@@ -302,7 +302,7 @@ LONG WINAPI RegEnumValue(
LPVOID lpEventData,
LPVOID lpContext
);*/
public int callback(int dwControl, int dwEventType, Pointer lpEventData, Pointer lpContext);
int callback(int dwControl, int dwEventType, Pointer lpEventData, Pointer lpContext);
}
/*
......@@ -316,7 +316,7 @@ typedef struct _SERVICE_STATUS {
DWORD dwWaitHint;
} SERVICE_STATUS,
*LPSERVICE_STATUS;*/
public static class SERVICE_STATUS extends Structure {
class SERVICE_STATUS extends Structure {
public int dwServiceType;
public int dwCurrentState;
public int dwControlsAccepted;
......@@ -332,12 +332,12 @@ typedef struct _SERVICE_TABLE_ENTRY {
LPSERVICE_MAIN_FUNCTION lpServiceProc;
} SERVICE_TABLE_ENTRY,
*LPSERVICE_TABLE_ENTRY;*/
public static class SERVICE_TABLE_ENTRY extends Structure {
class SERVICE_TABLE_ENTRY extends Structure {
public String lpServiceName;
public SERVICE_MAIN_FUNCTION lpServiceProc;
}
public static class ChangeServiceConfig2Info extends Structure {
class ChangeServiceConfig2Info extends Structure {
}
/*
......@@ -345,7 +345,7 @@ typedef struct _SERVICE_TABLE_ENTRY {
LPTSTR lpDescription;
} SERVICE_DESCRIPTION,
*LPSERVICE_DESCRIPTION;*/
public static class SERVICE_DESCRIPTION extends ChangeServiceConfig2Info {
class SERVICE_DESCRIPTION extends ChangeServiceConfig2Info {
public String lpDescription;
}
}
\ No newline at end of file
......@@ -65,9 +65,9 @@ public interface GNUCLibrary extends Library {
int fcntl(int fd, int command, int flags);
// obtained from Linux. Needs to be checked if these values are portable.
static final int F_GETFD = 1;
static final int F_SETFD = 2;
static final int FD_CLOEXEC = 1;
int F_GETFD = 1;
int F_SETFD = 2;
int FD_CLOEXEC = 1;
int chown(String fileName, int uid, int gid);
int chmod(String fileName, int i);
......@@ -106,5 +106,5 @@ public interface GNUCLibrary extends Library {
*/
int readlink(String filename, Memory buffer, NativeLong size);
public static final GNUCLibrary LIBC = (GNUCLibrary) Native.loadLibrary("c",GNUCLibrary.class);
GNUCLibrary LIBC = (GNUCLibrary) Native.loadLibrary("c",GNUCLibrary.class);
}
......@@ -34,22 +34,22 @@ import com.sun.jna.Native;
* @author Kohsuke Kawaguchi
*/
public interface Kernel32 extends StdCallLibrary {
public static final Kernel32 INSTANCE = (Kernel32)Native.loadLibrary("kernel32", Kernel32.class);
Kernel32 INSTANCE = (Kernel32)Native.loadLibrary("kernel32", Kernel32.class);
/**
* See http://msdn.microsoft.com/en-us/library/aa365240(VS.85).aspx
*/
boolean MoveFileExA(String existingFileName, String newFileName, int flags );
static final int MOVEFILE_COPY_ALLOWED = 2;
static final int MOVEFILE_CREATE_HARDLINK = 16;
static final int MOVEFILE_DELAY_UNTIL_REBOOT = 4;
static final int MOVEFILE_FAIL_IF_NOT_TRACKABLE = 32;
static final int MOVEFILE_REPLACE_EXISTING = 1;
static final int MOVEFILE_WRITE_THROUGH = 8;
int MOVEFILE_COPY_ALLOWED = 2;
int MOVEFILE_CREATE_HARDLINK = 16;
int MOVEFILE_DELAY_UNTIL_REBOOT = 4;
int MOVEFILE_FAIL_IF_NOT_TRACKABLE = 32;
int MOVEFILE_REPLACE_EXISTING = 1;
int MOVEFILE_WRITE_THROUGH = 8;
int WaitForSingleObject(Pointer handle, int milliseconds);
boolean GetExitCodeProcess(Pointer handle, IntByReference r);
static final int STILL_ACTIVE = 259;
int STILL_ACTIVE = 259;
}
......@@ -30,7 +30,7 @@ import com.sun.jna.win32.StdCallLibrary;
* @author Kohsuke Kawaguchi
*/
public interface Shell32 extends StdCallLibrary {
public static final Shell32 INSTANCE = (Shell32) Native.loadLibrary("shell32", Shell32.class);
Shell32 INSTANCE = (Shell32) Native.loadLibrary("shell32", Shell32.class);
/**
* @return true if successful. Otherwise false.
......
......@@ -31,7 +31,7 @@ typedef struct _SECURITY_ATTRIBUTES {
} SECURITY_ATTRIBUTES,
*PSECURITY_ATTRIBUTES,
*LPSECURITY_ATTRIBUTES;*/
public static class SECURITY_ATTRIBUTES extends Structure {
class SECURITY_ATTRIBUTES extends Structure {
public int nLength;
public Pointer lpSecurityDescriptor;
public boolean bInheritHandle;
......@@ -42,7 +42,7 @@ typedef struct _FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;*/
public static class FILETIME extends Structure {
class FILETIME extends Structure {
public int dwLowDateTime;
public int dwHighDateTime;
}
......
......@@ -20,9 +20,9 @@ package hudson.util.jna;
* @author TB
*/
public interface WINERROR {
public final static int ERROR_SUCCESS = 0;
public final static int NO_ERROR = 0;
public final static int ERROR_FILE_NOT_FOUND = 2;
public final static int ERROR_MORE_DATA = 234;
public final static int ERROR_NO_MORE_ITEMS = 259;
int ERROR_SUCCESS = 0;
int NO_ERROR = 0;
int ERROR_FILE_NOT_FOUND = 2;
int ERROR_MORE_DATA = 234;
int ERROR_NO_MORE_ITEMS = 259;
}
......@@ -20,60 +20,60 @@ package hudson.util.jna;
* @author TB
*/
public interface WINNT {
public final static int DELETE = 0x00010000;
public final static int READ_CONTROL = 0x00020000;
public final static int WRITE_DAC = 0x00040000;
public final static int WRITE_OWNER = 0x00080000;
public final static int SYNCHRONIZE = 0x00100000;
int DELETE = 0x00010000;
int READ_CONTROL = 0x00020000;
int WRITE_DAC = 0x00040000;
int WRITE_OWNER = 0x00080000;
int SYNCHRONIZE = 0x00100000;
public final static int STANDARD_RIGHTS_REQUIRED = 0x000F0000;
int STANDARD_RIGHTS_REQUIRED = 0x000F0000;
public final static int STANDARD_RIGHTS_READ = READ_CONTROL;
public final static int STANDARD_RIGHTS_WRITE = READ_CONTROL;
public final static int STANDARD_RIGHTS_EXECUTE = READ_CONTROL;
int STANDARD_RIGHTS_READ = READ_CONTROL;
int STANDARD_RIGHTS_WRITE = READ_CONTROL;
int STANDARD_RIGHTS_EXECUTE = READ_CONTROL;
public final static int STANDARD_RIGHTS_ALL = 0x001F0000;
int STANDARD_RIGHTS_ALL = 0x001F0000;
public final static int SPECIFIC_RIGHTS_ALL = 0x0000FFFF;
int SPECIFIC_RIGHTS_ALL = 0x0000FFFF;
public final static int GENERIC_EXECUTE = 0x20000000;
int GENERIC_EXECUTE = 0x20000000;
public final static int SERVICE_WIN32_OWN_PROCESS = 0x00000010;
int SERVICE_WIN32_OWN_PROCESS = 0x00000010;
public final static int KEY_QUERY_VALUE = 0x0001;
public final static int KEY_SET_VALUE = 0x0002;
public final static int KEY_CREATE_SUB_KEY = 0x0004;
public final static int KEY_ENUMERATE_SUB_KEYS = 0x0008;
public final static int KEY_NOTIFY = 0x0010;
public final static int KEY_CREATE_LINK = 0x0020;
int KEY_QUERY_VALUE = 0x0001;
int KEY_SET_VALUE = 0x0002;
int KEY_CREATE_SUB_KEY = 0x0004;
int KEY_ENUMERATE_SUB_KEYS = 0x0008;
int KEY_NOTIFY = 0x0010;
int KEY_CREATE_LINK = 0x0020;
public final static int KEY_READ = ((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & (~SYNCHRONIZE));
public final static int KEY_WRITE = ((STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY) & (~SYNCHRONIZE));
int KEY_READ = ((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & (~SYNCHRONIZE));
int KEY_WRITE = ((STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY) & (~SYNCHRONIZE));
public final static int REG_NONE = 0; // No value type
public final static int REG_SZ = 1; // Unicode nul terminated string
public final static int REG_EXPAND_SZ = 2; // Unicode nul terminated string
// (with environment variable references)
public final static int REG_BINARY = 3; // Free form binary
public final static int REG_DWORD = 4; // 32-bit number
public final static int REG_DWORD_LITTLE_ENDIAN = 4; // 32-bit number (same as REG_DWORD)
public final static int REG_DWORD_BIG_ENDIAN = 5; // 32-bit number
public final static int REG_LINK = 6; // Symbolic Link (unicode)
public final static int REG_MULTI_SZ = 7; // Multiple Unicode strings
public final static int REG_RESOURCE_LIST = 8; // Resource list in the resource map
public final static int REG_FULL_RESOURCE_DESCRIPTOR = 9; // Resource list in the hardware description
public final static int REG_RESOURCE_REQUIREMENTS_LIST = 10;
int REG_NONE = 0; // No value type
int REG_SZ = 1; // Unicode nul terminated string
int REG_EXPAND_SZ = 2; // Unicode nul terminated string
// (with environment variable references)
int REG_BINARY = 3; // Free form binary
int REG_DWORD = 4; // 32-bit number
int REG_DWORD_LITTLE_ENDIAN = 4; // 32-bit number (same as REG_DWORD)
int REG_DWORD_BIG_ENDIAN = 5; // 32-bit number
int REG_LINK = 6; // Symbolic Link (unicode)
int REG_MULTI_SZ = 7; // Multiple Unicode strings
int REG_RESOURCE_LIST = 8; // Resource list in the resource map
int REG_FULL_RESOURCE_DESCRIPTOR = 9; // Resource list in the hardware description
int REG_RESOURCE_REQUIREMENTS_LIST = 10;
public final static int REG_OPTION_RESERVED = 0x00000000; // Parameter is reserved
public final static int REG_OPTION_NON_VOLATILE = 0x00000000; // Key is preserved
// when system is rebooted
public final static int REG_OPTION_VOLATILE = 0x00000001; // Key is not preserved
// when system is rebooted
public final static int REG_OPTION_CREATE_LINK = 0x00000002; // Created key is a
// symbolic link
public final static int REG_OPTION_BACKUP_RESTORE = 0x00000004; // open for backup or restore
// special access rules
// privilege required
public final static int REG_OPTION_OPEN_LINK = 0x00000008; // Open symbolic link
int REG_OPTION_RESERVED = 0x00000000; // Parameter is reserved
int REG_OPTION_NON_VOLATILE = 0x00000000; // Key is preserved
// when system is rebooted
int REG_OPTION_VOLATILE = 0x00000001; // Key is not preserved
// when system is rebooted
int REG_OPTION_CREATE_LINK = 0x00000002; // Created key is a
// symbolic link
int REG_OPTION_BACKUP_RESTORE = 0x00000004; // open for backup or restore
// special access rules
// privilege required
int REG_OPTION_OPEN_LINK = 0x00000008; // Open symbolic link
}
......@@ -46,9 +46,9 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @param clazz The class of the bean
* @return A BeanConfiguration instance
*/
public BeanConfiguration addSingletonBean(String name, Class clazz);
BeanConfiguration addSingletonBean(String name, Class clazz);
public WebApplicationContext getUnrefreshedApplicationContext();
WebApplicationContext getUnrefreshedApplicationContext();
/**
* Adds a prototype bean definition
*
......@@ -56,7 +56,7 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @param clazz The class of the bean
* @return A BeanConfiguration instance
*/
public BeanConfiguration addPrototypeBean(String name, Class clazz);
BeanConfiguration addPrototypeBean(String name, Class clazz);
/**
* Retrieves the application context from the current state
......@@ -71,7 +71,7 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
*
* @return A BeanConfiguration instance
*/
public BeanConfiguration addSingletonBean(String name);
BeanConfiguration addSingletonBean(String name);
/**
* Adds an empty prototype bean configuration
......@@ -79,7 +79,7 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @param name The name of the prototype bean
* @return A BeanConfiguration instance
*/
public BeanConfiguration addPrototypeBean(String name);
BeanConfiguration addPrototypeBean(String name);
/**
* Creates a singleton bean configuration. Differs from addSingletonBean in that
......@@ -89,7 +89,7 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @param clazz
* @return A BeanConfiguration instance
*/
public BeanConfiguration createSingletonBean(Class clazz);
BeanConfiguration createSingletonBean(Class clazz);
/**
* Creates a new singleton bean and adds it to the list of bean references
......@@ -99,7 +99,7 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @param args The constructor arguments of the bean
* @return A BeanConfiguration instance
*/
public BeanConfiguration addSingletonBean(String name, Class clazz, Collection args);
BeanConfiguration addSingletonBean(String name, Class clazz, Collection args);
/**
* Creates a singleton bean configuration. Differs from addSingletonBean in that
......@@ -110,14 +110,14 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @param constructorArguments The constructor arguments
* @return A BeanConfiguration instance
*/
public BeanConfiguration createSingletonBean(Class clazz, Collection constructorArguments);
BeanConfiguration createSingletonBean(Class clazz, Collection constructorArguments);
/**
* Sets the servlet context
*
* @param context The servlet Context
*/
public void setServletContext(ServletContext context);
void setServletContext(ServletContext context);
/**
* Creates a new prototype bean configuration. Differs from addPrototypeBean in that
......@@ -128,7 +128,7 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @return A BeanConfiguration instance
*
*/
public BeanConfiguration createPrototypeBean(String name);
BeanConfiguration createPrototypeBean(String name);
/**
* Creates a new singleton bean configuration. Differs from addSingletonBean in that
......@@ -139,7 +139,7 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @return A BeanConfiguration instance
*
*/
public BeanConfiguration createSingletonBean(String name);
BeanConfiguration createSingletonBean(String name);
/**
* Adds a bean configuration to the list of beans to be created
......@@ -154,7 +154,7 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @param name The name of the bean
* @param bd The BeanDefinition instance
*/
public void addBeanDefinition(String name, BeanDefinition bd);
void addBeanDefinition(String name, BeanDefinition bd);
/**
* Returns whether the runtime spring config contains the specified bean
......@@ -162,13 +162,13 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @param name The bean name
* @return True if it does
*/
public boolean containsBean(String name);
boolean containsBean(String name);
/**
* Returns the BeanConfiguration for the specified name
* @param name The name of the bean configuration
* @return The BeanConfiguration
*/
public BeanConfiguration getBeanConfig(String name);
BeanConfiguration getBeanConfig(String name);
/**
* Creates and returns the BeanDefinition that is regsitered within the given name or returns null
......@@ -176,14 +176,14 @@ interface RuntimeSpringConfiguration extends ServletContextAware {
* @param name The name of the bean definition
* @return A BeanDefinition
*/
public AbstractBeanDefinition createBeanDefinition(String name);
AbstractBeanDefinition createBeanDefinition(String name);
/**
* Registers a bean factory post processor with the context
*
* @param processor The BeanFactoryPostProcessor instance
*/
public void registerPostProcessor(BeanFactoryPostProcessor processor);
void registerPostProcessor(BeanFactoryPostProcessor processor);
List<String> getBeanNames();
......
......@@ -155,7 +155,7 @@ public interface MavenBuildProxy {
*/
void setExecutedMojos(List<ExecutedMojo> executedMojos);
public interface BuildCallable<V,T extends Throwable> extends Serializable {
interface BuildCallable<V,T extends Throwable> extends Serializable {
/**
* Performs computation and returns the result,
* or throws some exception.
......@@ -177,7 +177,7 @@ public interface MavenBuildProxy {
*
* Meant to be useful as the base class for other filters.
*/
/*package*/ static abstract class Filter<CORE extends MavenBuildProxy> implements MavenBuildProxy, Serializable {
/*package*/ abstract class Filter<CORE extends MavenBuildProxy> implements MavenBuildProxy, Serializable {
protected final CORE core;
protected Filter(CORE core) {
......
......@@ -54,7 +54,7 @@ public interface MavenBuildProxy2 extends MavenBuildProxy {
*
* Meant to be useful as the base class for other filters.
*/
/*package*/ static abstract class Filter<CORE extends MavenBuildProxy2> extends MavenBuildProxy.Filter<CORE> implements MavenBuildProxy2 {
/*package*/ abstract class Filter<CORE extends MavenBuildProxy2> extends MavenBuildProxy.Filter<CORE> implements MavenBuildProxy2 {
private static final long serialVersionUID = -1208416744028858844L;
protected Filter(CORE core) {
......
......@@ -55,5 +55,5 @@ public interface MavenProjectActionBuilder {
* can be empty but never null.
* @since 1.341
*/
public Collection<? extends Action> getProjectActions(MavenModule module);
Collection<? extends Action> getProjectActions(MavenModule module);
}
......@@ -28,7 +28,7 @@ public interface FakeLauncher {
/**
* Fake {@link Proc} implementation that represents a completed process.
*/
public class FinishedProc extends Proc {
class FinishedProc extends Proc {
public final int exitCode;
public FinishedProc(int exitCode) {
......
......@@ -49,7 +49,7 @@ public interface HudsonHomeLoader {
/**
* Allocates a new empty directory, meaning this will emulate the fresh Hudson installation.
*/
public static final HudsonHomeLoader NEW = new HudsonHomeLoader() {
HudsonHomeLoader NEW = new HudsonHomeLoader() {
public File allocate() throws IOException {
return TestEnvironment.get().temporaryDirectoryAllocator.allocate();
}
......@@ -58,7 +58,7 @@ public interface HudsonHomeLoader {
/**
* Allocates a new directory by copying from an existing directory, or unzipping from a zip file.
*/
public static final class CopyExisting implements HudsonHomeLoader {
final class CopyExisting implements HudsonHomeLoader {
private final URL source;
/**
......@@ -104,7 +104,7 @@ public interface HudsonHomeLoader {
/**
* Allocates a new directory by copying from a test resource
*/
public static final class Local implements HudsonHomeLoader {
final class Local implements HudsonHomeLoader {
private final Method testMethod;
public Local(Method testMethod) {
......
......@@ -35,7 +35,7 @@ public @interface JenkinsRecipe {
* @param <T>
* The recipe annotation associated with this runner.
*/
public abstract class Runner<T extends Annotation> {
abstract class Runner<T extends Annotation> {
/**
* Called during {@link TestCase#setUp()} to prepare the test environment.
*/
......
......@@ -29,5 +29,5 @@ package org.jvnet.hudson.test;
* @author Kohsuke Kawaguchi
*/
public interface LenientRunnable {
public void run() throws Exception;
void run() throws Exception;
}
......@@ -72,7 +72,7 @@ import static java.lang.annotation.ElementType.METHOD;
@Target(METHOD)
@Retention(RUNTIME)
public @interface LocalData {
public class RunnerImpl extends Recipe.Runner<LocalData> {
class RunnerImpl extends Recipe.Runner<LocalData> {
public void setup(HudsonTestCase testCase, LocalData recipe) throws Exception {
testCase.with(new Local(testCase.getClass().getMethod(testCase.getName())));
}
......
......@@ -48,7 +48,7 @@ public @interface PresetData {
*/
DataSet value();
public enum DataSet {
enum DataSet {
/**
* Secured Hudson that has no anonymous read access.
* Any logged in user can do anything.
......@@ -61,7 +61,7 @@ public @interface PresetData {
ANONYMOUS_READONLY,
}
public class RunnerImpl extends Recipe.Runner<PresetData> {
class RunnerImpl extends Recipe.Runner<PresetData> {
public void setup(HudsonTestCase testCase, PresetData recipe) {
testCase.withPresetData(recipe.value().name().toLowerCase(Locale.ENGLISH).replace('_','-'));
}
......
......@@ -60,7 +60,7 @@ public @interface Recipe {
* @param <T>
* The recipe annotation associated with this runner.
*/
public abstract class Runner<T extends Annotation> {
abstract class Runner<T extends Annotation> {
/**
* Called during {@link TestCase#setUp()} to prepare the test environment.
*/
......
......@@ -52,7 +52,7 @@ public @interface WithPlugin {
*/
String value();
public class RunnerImpl extends Recipe.Runner<WithPlugin> {
class RunnerImpl extends Recipe.Runner<WithPlugin> {
private WithPlugin a;
@Override
......
......@@ -47,7 +47,7 @@ import static java.lang.annotation.RetentionPolicy.*;
public @interface WithPluginManager {
Class<? extends PluginManager> value();
public class RunnerImpl extends Recipe.Runner<WithPluginManager> {
class RunnerImpl extends Recipe.Runner<WithPluginManager> {
private WithPluginManager recipe;
@Override
public void setup(HudsonTestCase testCase, WithPluginManager recipe) throws Exception {
......
......@@ -87,7 +87,7 @@ public class ExtensionFinderTest extends HudsonTestCase {
@Retention(RetentionPolicy.RUNTIME) @Qualifier
public static @interface LionKing {}
public @interface LionKing {}
@Extension
public static class ModuleImpl extends AbstractModule {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册