Java 5 compilation fixes.
This commit is contained in:
@@ -17,22 +17,18 @@ public class DefaultFileSystem implements FileSystem {
|
|||||||
this.remote = remote;
|
this.remote = remote;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDeviceName() {
|
public String getDeviceName() {
|
||||||
return deviceName;
|
return deviceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public File getMountPoint() {
|
public File getMountPoint() {
|
||||||
return mountPoint;
|
return mountPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getFileSystemType() {
|
public String getFileSystemType() {
|
||||||
return fileSystemType;
|
return fileSystemType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isRemote() {
|
public boolean isRemote() {
|
||||||
return remote;
|
return remote;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ public class DefaultPosixFile implements PosixFile {
|
|||||||
this.characterEncoding = systemInfo.characterEncoding;
|
this.characterEncoding = systemInfo.characterEncoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setMode(File file, int perms) {
|
public void setMode(File file, int perms) {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
PosixFileFunctions.chmod(encode(file), perms, result);
|
PosixFileFunctions.chmod(encode(file), perms, result);
|
||||||
@@ -31,7 +30,6 @@ public class DefaultPosixFile implements PosixFile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getMode(File file) {
|
public int getMode(File file) {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
FileStat stat = new FileStat();
|
FileStat stat = new FileStat();
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package net.rubygrapefruit.platform.internal;
|
package net.rubygrapefruit.platform.internal;
|
||||||
|
|
||||||
import net.rubygrapefruit.platform.*;
|
import net.rubygrapefruit.platform.*;
|
||||||
import net.rubygrapefruit.platform.internal.jni.PosixProcessFunctions;
|
import net.rubygrapefruit.platform.internal.jni.PosixProcessFunctions;
|
||||||
|
|
||||||
public class DefaultProcess implements net.rubygrapefruit.platform.Process {
|
public class DefaultProcess implements net.rubygrapefruit.platform.Process {
|
||||||
@Override
|
public int getProcessId() throws NativeException {
|
||||||
public int getProcessId() throws NativeException {
|
return PosixProcessFunctions.getPid();
|
||||||
return PosixProcessFunctions.getPid();
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -8,17 +8,14 @@ public class MutableSystemInfo implements SystemInfo {
|
|||||||
public String characterEncoding;
|
public String characterEncoding;
|
||||||
public String machineArchitecture;
|
public String machineArchitecture;
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getKernelName() {
|
public String getKernelName() {
|
||||||
return osName;
|
return osName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getKernelVersion() {
|
public String getKernelVersion() {
|
||||||
return osVersion;
|
return osVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getMachineArchitecture() {
|
public String getMachineArchitecture() {
|
||||||
return machineArchitecture;
|
return machineArchitecture;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import net.rubygrapefruit.platform.internal.jni.PosixFileSystemFunctions;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PosixFileSystems implements FileSystems {
|
public class PosixFileSystems implements FileSystems {
|
||||||
@Override
|
|
||||||
public List<FileSystem> getFileSystems() {
|
public List<FileSystem> getFileSystems() {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
FileSystemList fileSystems = new FileSystemList();
|
FileSystemList fileSystems = new FileSystemList();
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TerminalSize getTerminalSize() {
|
public TerminalSize getTerminalSize() {
|
||||||
MutableTerminalSize terminalSize = new MutableTerminalSize();
|
MutableTerminalSize terminalSize = new MutableTerminalSize();
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
@@ -46,22 +45,18 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return terminalSize;
|
return terminalSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsColor() {
|
public boolean supportsColor() {
|
||||||
return capabilities.colors;
|
return capabilities.colors;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsCursorMotion() {
|
public boolean supportsCursorMotion() {
|
||||||
return capabilities.cursorMotion;
|
return capabilities.cursorMotion;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsTextAttributes() {
|
public boolean supportsTextAttributes() {
|
||||||
return capabilities.textAttributes;
|
return capabilities.textAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal foreground(Color color) {
|
public Terminal foreground(Color color) {
|
||||||
if (!capabilities.colors) {
|
if (!capabilities.colors) {
|
||||||
return this;
|
return this;
|
||||||
@@ -78,7 +73,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal bold() {
|
public Terminal bold() {
|
||||||
if (!capabilities.textAttributes) {
|
if (!capabilities.textAttributes) {
|
||||||
return this;
|
return this;
|
||||||
@@ -94,7 +88,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal normal() {
|
public Terminal normal() {
|
||||||
reset();
|
reset();
|
||||||
if (foreground != null) {
|
if (foreground != null) {
|
||||||
@@ -103,7 +96,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal reset() {
|
public Terminal reset() {
|
||||||
stream.flush();
|
stream.flush();
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
@@ -114,7 +106,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorDown(int count) {
|
public Terminal cursorDown(int count) {
|
||||||
stream.flush();
|
stream.flush();
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
@@ -125,7 +116,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorUp(int count) {
|
public Terminal cursorUp(int count) {
|
||||||
stream.flush();
|
stream.flush();
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
@@ -136,7 +126,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorLeft(int count) {
|
public Terminal cursorLeft(int count) {
|
||||||
stream.flush();
|
stream.flush();
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
@@ -147,7 +136,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorRight(int count) {
|
public Terminal cursorRight(int count) {
|
||||||
stream.flush();
|
stream.flush();
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
@@ -158,7 +146,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorStartOfLine() throws NativeException {
|
public Terminal cursorStartOfLine() throws NativeException {
|
||||||
stream.flush();
|
stream.flush();
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
@@ -169,7 +156,6 @@ public class TerminfoTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal clearToEndOfLine() throws NativeException {
|
public Terminal clearToEndOfLine() throws NativeException {
|
||||||
stream.flush();
|
stream.flush();
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
|
|||||||
@@ -8,12 +8,10 @@ public class TerminfoTerminalAccess implements TerminalAccess {
|
|||||||
private static Output currentlyOpen;
|
private static Output currentlyOpen;
|
||||||
private static TerminfoTerminal current;
|
private static TerminfoTerminal current;
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isTerminal(Output output) {
|
public boolean isTerminal(Output output) {
|
||||||
return PosixTerminalFunctions.isatty(output.ordinal());
|
return PosixTerminalFunctions.isatty(output.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal getTerminal(Output output) {
|
public Terminal getTerminal(Output output) {
|
||||||
if (currentlyOpen != null && currentlyOpen != output) {
|
if (currentlyOpen != null && currentlyOpen != output) {
|
||||||
throw new UnsupportedOperationException("Currently only one output can be used as a terminal.");
|
throw new UnsupportedOperationException("Currently only one output can be used as a terminal.");
|
||||||
|
|||||||
@@ -27,22 +27,18 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsColor() {
|
public boolean supportsColor() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsTextAttributes() {
|
public boolean supportsTextAttributes() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsCursorMotion() {
|
public boolean supportsCursorMotion() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TerminalSize getTerminalSize() {
|
public TerminalSize getTerminalSize() {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
MutableTerminalSize size = new MutableTerminalSize();
|
MutableTerminalSize size = new MutableTerminalSize();
|
||||||
@@ -53,7 +49,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal bold() {
|
public Terminal bold() {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.bold(result);
|
WindowsConsoleFunctions.bold(result);
|
||||||
@@ -63,7 +58,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal foreground(Color color) {
|
public Terminal foreground(Color color) {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.foreground(color.ordinal(), result);
|
WindowsConsoleFunctions.foreground(color.ordinal(), result);
|
||||||
@@ -73,7 +67,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal normal() {
|
public Terminal normal() {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.normal(result);
|
WindowsConsoleFunctions.normal(result);
|
||||||
@@ -83,7 +76,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal reset() {
|
public Terminal reset() {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.reset(result);
|
WindowsConsoleFunctions.reset(result);
|
||||||
@@ -93,7 +85,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorDown(int count) throws NativeException {
|
public Terminal cursorDown(int count) throws NativeException {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.down(count, result);
|
WindowsConsoleFunctions.down(count, result);
|
||||||
@@ -103,7 +94,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorUp(int count) throws NativeException {
|
public Terminal cursorUp(int count) throws NativeException {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.up(count, result);
|
WindowsConsoleFunctions.up(count, result);
|
||||||
@@ -113,7 +103,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorLeft(int count) throws NativeException {
|
public Terminal cursorLeft(int count) throws NativeException {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.left(count, result);
|
WindowsConsoleFunctions.left(count, result);
|
||||||
@@ -123,7 +112,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorRight(int count) throws NativeException {
|
public Terminal cursorRight(int count) throws NativeException {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.right(count, result);
|
WindowsConsoleFunctions.right(count, result);
|
||||||
@@ -133,7 +121,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal cursorStartOfLine() throws NativeException {
|
public Terminal cursorStartOfLine() throws NativeException {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.startLine(result);
|
WindowsConsoleFunctions.startLine(result);
|
||||||
@@ -143,7 +130,6 @@ public class WindowsTerminal extends AbstractTerminal {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal clearToEndOfLine() throws NativeException {
|
public Terminal clearToEndOfLine() throws NativeException {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
WindowsConsoleFunctions.clearToEndOfLine(result);
|
WindowsConsoleFunctions.clearToEndOfLine(result);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ public class WindowsTerminalAccess implements TerminalAccess {
|
|||||||
private static Output currentlyOpen;
|
private static Output currentlyOpen;
|
||||||
private static WindowsTerminal current;
|
private static WindowsTerminal current;
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isTerminal(Output output) {
|
public boolean isTerminal(Output output) {
|
||||||
FunctionResult result = new FunctionResult();
|
FunctionResult result = new FunctionResult();
|
||||||
boolean console = WindowsConsoleFunctions.isConsole(output.ordinal(), result);
|
boolean console = WindowsConsoleFunctions.isConsole(output.ordinal(), result);
|
||||||
@@ -20,7 +19,6 @@ public class WindowsTerminalAccess implements TerminalAccess {
|
|||||||
return console;
|
return console;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Terminal getTerminal(Output output) {
|
public Terminal getTerminal(Output output) {
|
||||||
if (currentlyOpen !=null && currentlyOpen != output) {
|
if (currentlyOpen !=null && currentlyOpen != output) {
|
||||||
throw new UnsupportedOperationException("Currently only one output can be used as a terminal.");
|
throw new UnsupportedOperationException("Currently only one output can be used as a terminal.");
|
||||||
|
|||||||
Reference in New Issue
Block a user