java: add @Override annotation to overriding methods

Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
This commit is contained in:
Noel Grandin
2014-08-06 08:55:09 +02:00
parent e2e55a7c49
commit 0477e6c39b
1317 changed files with 3116 additions and 15 deletions

View File

@ -165,6 +165,7 @@ public class ParcelBrowseNode extends PropertySet
return BrowseNodeTypes.CONTAINER;
}
@Override
public String toString()
{
return getName();

View File

@ -39,6 +39,7 @@ public class PkgProviderBrowseNode extends ProviderBrowseNode
}
@Override
public String getName() {
String name = "Unknown";
if ( container != null )

View File

@ -157,6 +157,7 @@ public class ProviderBrowseNode extends PropertySet
return BrowseNodeTypes.CONTAINER;
}
@Override
public String toString()
{
return getName();

View File

@ -137,6 +137,7 @@ public class ScriptBrowseNode extends PropertySet
return BrowseNodeTypes.SCRIPT;
}
@Override
public String toString() {
return getName();
}

View File

@ -70,6 +70,7 @@ public class ScriptEntry implements Cloneable {
this("Java", languagename, location);
}
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
@ -113,6 +114,7 @@ public class ScriptEntry implements Cloneable {
return description;
}
@Override
public String toString() {
return "\nLogicalName = " + logicalname + "\nLanguageName = " + languagename + "\nLocation = " + location + "\nLanguaguageProperties = " + languagedepprops;
}

View File

@ -90,6 +90,7 @@ public class ScriptMetaData extends ScriptEntry {
}
}
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
@ -230,6 +231,7 @@ public class ScriptMetaData extends ScriptEntry {
}
@Override
public String toString()
{
return "\nParcelLocation = " + getParcelLocation() + "\nLocationPlaceHolder = " + locationPlaceHolder + super.toString();

View File

@ -178,6 +178,7 @@ public class UnoPkgContainer extends ParcelContainer
}
@Override
public ScriptMetaData findScript( ParsedScriptUri psu ) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException
{

View File

@ -46,6 +46,7 @@ public class UCBStreamHandler extends URLStreamHandler {
this.m_xSimpleFileAccess = xSFA;
}
@Override
public void parseURL(URL url, String spec, int start, int limit) {
LogUtils.DEBUG("**XUCBStreamHandler, parseURL: " + url + " spec: " + spec + " start: " + start + " limit: " + limit );
@ -60,6 +61,7 @@ public class UCBStreamHandler extends URLStreamHandler {
setURL(url, m_ucbscheme, null, -1, null, null, file, null, null);
}
@Override
public URLConnection openConnection(URL u) throws IOException {
return new UCBConnection(u);
}
@ -70,9 +72,11 @@ public class UCBStreamHandler extends URLStreamHandler {
super(url);
}
@Override
public void connect() {
}
@Override
public InputStream getInputStream() throws IOException {
LogUtils.DEBUG("UCBConnectionHandler GetInputStream on " + url );
String sUrl = url.toString();
@ -88,6 +92,7 @@ public class UCBStreamHandler extends URLStreamHandler {
return getUCBStream(file, path);
}
}
@Override
public OutputStream getOutputStream() throws IOException {
LogUtils.DEBUG("UCBConnectionHandler getOutputStream on " + url );
OutputStream os = null;

View File

@ -27,6 +27,7 @@ public class XInputStreamWrapper extends InputStream {
m_xInputStream = xInputStream;
}
@Override
public int read() throws java.io.IOException
{
byte[][] byteRet = new byte[1][0];
@ -45,6 +46,7 @@ public class XInputStreamWrapper extends InputStream {
return byteRet[0][0];
}
@Override
public int read( byte[] b ) throws java.io.IOException
{
byte[][] byteRet = new byte[1][];
@ -59,6 +61,7 @@ public class XInputStreamWrapper extends InputStream {
}
}
@Override
public long skip(long n) throws java.io.IOException
{
try {
@ -70,6 +73,7 @@ public class XInputStreamWrapper extends InputStream {
}
}
@Override
public int available() throws java.io.IOException
{
try {
@ -80,6 +84,7 @@ public class XInputStreamWrapper extends InputStream {
}
}
@Override
public void close() throws java.io.IOException
{
try {

View File

@ -25,6 +25,7 @@ public class XOutputStreamWrapper extends OutputStream {
public XOutputStreamWrapper(XOutputStream xOs ) {
this.m_xOutputStream = xOs;
}
@Override
public void write(int b)
throws java.io.IOException
{
@ -43,6 +44,7 @@ public class XOutputStreamWrapper extends OutputStream {
throw new java.io.IOException(ioe.getMessage());
}
}
@Override
public void write(byte[] b)
throws java.io.IOException
{
@ -60,6 +62,7 @@ public class XOutputStreamWrapper extends OutputStream {
throw new java.io.IOException(ioe.getMessage());
}
}
@Override
public void write( byte[] b, int off, int len )
throws java.io.IOException
{
@ -82,6 +85,7 @@ public class XOutputStreamWrapper extends OutputStream {
}
}
@Override
public void flush()
throws java.io.IOException
{
@ -98,6 +102,7 @@ public class XOutputStreamWrapper extends OutputStream {
throw new java.io.IOException(ioe.getMessage());
}
}
@Override
public void close()
throws java.io.IOException
{

View File

@ -443,6 +443,7 @@ public abstract class ScriptProvider
return BrowseNodeTypes.CONTAINER;
}
@Override
public String toString()
{
return getName();

View File

@ -27,6 +27,7 @@ import javax.swing.SwingUtilities;
public final class SwingInvocation {
public static void invoke(final Runnable doRun) {
new Thread("SwingInvocation") {
@Override
public void run() { SwingUtilities.invokeLater(doRun); }
}.start();
}

View File

@ -175,6 +175,7 @@ class GlyphGutter extends JComponent {
setSize(d);
}
@Override
public void paintComponent(Graphics g) {
JTextArea textArea = view.getTextArea();

View File

@ -278,6 +278,7 @@ public class ScriptEditorForBeanShell
frame.addWindowListener(
new WindowAdapter()
{
@Override
public void windowClosing(WindowEvent e) {
doClose();
}

View File

@ -56,6 +56,7 @@ public class ScriptProviderForBeanShell
super (ctx, "BeanShell");
}
@Override
public XScript getScript( /*IN*/String scriptURI )
throws com.sun.star.uno.RuntimeException,
ScriptFrameworkErrorException
@ -74,11 +75,13 @@ public class ScriptProviderForBeanShell
}
}
@Override
public boolean hasScriptEditor()
{
return true;
}
@Override
public ScriptEditor getScriptEditor()
{
return ScriptEditorForBeanShell.getEditor();

View File

@ -174,6 +174,7 @@ public class ScriptDescriptor
*
* @return The scriptName including the parameters.
*/
@Override
public String toString()
{
StringBuffer description = new StringBuffer( m_name );

View File

@ -52,6 +52,7 @@ public class ScriptProviderForJava
super (ctx, "Java");
}
@Override
public XScript getScript( /*IN*/String scriptURI )
throws com.sun.star.uno.RuntimeException,
ScriptFrameworkErrorException
@ -77,11 +78,13 @@ public class ScriptProviderForJava
}
@Override
public boolean hasScriptEditor()
{
return false;
}
@Override
public ScriptEditor getScriptEditor()
{
return null;

View File

@ -266,11 +266,13 @@ public class ScriptEditorForJavaScript implements ScriptEditor
});
Context.addContextListener(sdb);
sdb.setScopeProvider(new ScopeProvider() {
@Override
public Scriptable getScope() {
return org.mozilla.javascript.tools.shell.Main.getScope();
}
});
sdb.addWindowListener( new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
shutdown();
}

View File

@ -57,6 +57,7 @@ public class ScriptProviderForJavaScript
super(ctx, "JavaScript");
}
@Override
public XScript getScript( /*IN*/String scriptURI )
throws com.sun.star.uno.RuntimeException,
ScriptFrameworkErrorException
@ -75,11 +76,13 @@ public class ScriptProviderForJavaScript
}
}
@Override
public boolean hasScriptEditor()
{
return true;
}
@Override
public ScriptEditor getScriptEditor()
{
return ScriptEditorForJavaScript.getEditor();

View File

@ -94,6 +94,7 @@ public class OfficeInstallation implements java.io.Serializable {
return true;
}
@Override
public String toString() {
return getName();
}

View File

@ -32,6 +32,7 @@ public class AllFilesFilter implements FileFilter {
return true;
}
@Override
public String toString() {
return "<all files>";
}

View File

@ -36,6 +36,7 @@ public class BinaryOnlyFilter implements FileFilter {
return false;
}
@Override
public String toString() {
/* StringBuffer buf = new StringBuffer(DESCRIPTION + ": ");

View File

@ -40,6 +40,7 @@ public class ExceptParcelFilter implements FileFilter {
return false;
}
@Override
public String toString() {
StringBuffer buf = new StringBuffer(DESCRIPTION + ": ");

View File

@ -61,6 +61,7 @@ public final class LocalOfficeImpl
* to the office distribution.
* @param port is a communication port.
*/
@Override
protected void connect(String officePath, int port)
throws ConnectException
{
@ -76,6 +77,7 @@ public final class LocalOfficeImpl
*
* @param uri is an identifier of storage has to be refreshed.
*/
@Override
public void refreshStorage(String uri)
{
try {
@ -95,6 +97,7 @@ System.out.println("*** LocalOfficeImpl.refreshStorage: DONE");
/**
* Closes the connection to the running office.
*/
@Override
public void disconnect()
{
/*

View File

@ -89,6 +89,7 @@ public class ScriptPanel extends JPanel {
column.setCellEditor(new DefaultCellEditor(new JTextField()));
table.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent evt) {
tableFocusLost();
}
@ -138,6 +139,7 @@ public class ScriptPanel extends JPanel {
return scripts.size();
}
@Override
public String getColumnName(int col) {
return columnNames[col];
}
@ -178,6 +180,7 @@ public class ScriptPanel extends JPanel {
return result;
}
@Override
public boolean isCellEditable(int row, int col) {
if (col == 0)
return false;
@ -185,6 +188,7 @@ public class ScriptPanel extends JPanel {
return true;
}
@Override
public void setValueAt(Object value, int row, int col) {
ScriptEntry entry = scripts.get(row);
entry.setLogicalName((String)value);