Javadoc warnings fixed

(Some JNA docs also changed to standard comments)
This commit is contained in:
Jindra Petřík
2015-04-06 06:32:40 +02:00
parent 1115432370
commit a7e79a9570
20 changed files with 221 additions and 220 deletions

View File

@@ -311,9 +311,9 @@ public class CommandLineArgumentParser {
/**
* Parses the console arguments
*
* @param arguments
* @param arguments Arguments
* @return paths to the file which should be opened or null
* @throws java.io.IOException
* @throws java.io.IOException On error
*/
public static String[] parseArguments(String[] arguments) throws IOException {
Level traceLevel = Level.WARNING;

View File

@@ -62,7 +62,7 @@ public class FontPanel extends javax.swing.JPanel {
/**
* Creates new form FontPanel
*
* @param mainPanel
* @param mainPanel Main panel
*/
public FontPanel(MainPanel mainPanel) {
this.mainPanel = mainPanel;

View File

@@ -38,9 +38,9 @@ public class FontPreviewDialog extends AppDialog {
/**
* Creates new form FontPreviewDialog
*
* @param parent
* @param font
* @param modal
* @param parent Parent frame
* @param font Font
* @param modal Will show as modal?
*/
public FontPreviewDialog(java.awt.Frame parent, boolean modal, Font font) {
super();

View File

@@ -46,7 +46,7 @@ public class LicenseUpdater {
* Script for updating license header in java files :-)
*
* @param dir Star directory (e.g. "src/")
* @param lgpl
* @param lgpl Is LGPL?
*/
public static void updateLicenseInDir(File dir, boolean lgpl) {

View File

@@ -38,7 +38,8 @@ public class LinkLabel extends JLabel {
/**
* Creates a new LinkLabel with the given text.
*
* @param text
* @param text Text
* @param url URL
*/
public LinkLabel(String text, String url) {
super(text);
@@ -55,7 +56,7 @@ public class LinkLabel extends JLabel {
/**
* Sets the text of the label.
*
* @param text
* @param text Text to show
*/
@Override
public void setText(String text) {
@@ -66,7 +67,7 @@ public class LinkLabel extends JLabel {
/**
* Returns the text set by the user.
*
* @return
* @return Text
*/
public String getNormalText() {
return text;
@@ -75,7 +76,7 @@ public class LinkLabel extends JLabel {
/**
* Processes mouse events and responds to clicks.
*
* @param evt
* @param evt Event
*/
@Override
protected void processMouseEvent(MouseEvent evt) {

View File

@@ -1002,7 +1002,7 @@ public class Main {
/**
* @param args the command line arguments
* @throws IOException
* @throws IOException On error
*/
public static void main(String[] args) throws IOException {

View File

@@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.gui;
/**
*
* @author JPEXS
* @param <E>
* @param <E> Element to search
*/
public interface SearchListener<E> {

View File

@@ -31,7 +31,7 @@ import jsyntaxpane.actions.DocumentSearchData;
/**
*
* @author JPEXS
* @param <E>
* @param <E> Element to search
*/
public class SearchPanel<E> extends JPanel implements ActionListener {

View File

@@ -35,7 +35,7 @@ import javax.swing.JScrollPane;
/**
*
* @author JPEXS
* @param <E>
* @param <E> Element to search
*/
public class SearchResultsDialog<E> extends AppDialog implements ActionListener {

View File

@@ -54,7 +54,7 @@ public class MyMarkers {
/**
* Remove all the markers from an JEditorPane
*
* @param editorPane
* @param editorPane Editor
*/
public static void removeMarkers(JTextComponent editorPane) {
removeMarkers(editorPane, null);
@@ -63,9 +63,9 @@ public class MyMarkers {
/**
* add highlights for the given Token on the given pane
*
* @param pane
* @param token
* @param marker
* @param pane Editor
* @param token Token
* @param marker Marker
*/
public static void markToken(JTextComponent pane, Token token, Highlighter.HighlightPainter marker) {
markText(pane, token.start, token.end(), marker);
@@ -74,10 +74,10 @@ public class MyMarkers {
/**
* add highlights for the given region on the given pane
*
* @param pane
* @param start
* @param end
* @param marker
* @param pane Editor
* @param start Start index
* @param end End index
* @param marker Marker
*/
public static void markText(JTextComponent pane, int start, int end, Highlighter.HighlightPainter marker) {
try {

View File

@@ -46,7 +46,7 @@ public class SpringUtilities {
* A debugging utility that prints to stdout the component's minimum,
* preferred, and maximum sizes.
*
* @param c
* @param c Component
*/
public static void printSizes(Component c) {
System.out.println("minimumSize = " + c.getMinimumSize());
@@ -60,7 +60,7 @@ public class SpringUtilities {
* preferred width and height of the components. The parent is made just big
* enough to fit them all.
*
* @param parent
* @param parent Parent container
* @param rows number of rows
* @param cols number of columns
* @param initialX x location to start the grid at
@@ -163,7 +163,7 @@ public class SpringUtilities {
* similarly determined for each row. The parent is made just big enough to
* fit them all.
*
* @param parent
* @param parent parent container
* @param rows number of rows
* @param cols number of columns
* @param initialX x location to start the grid at

View File

@@ -220,7 +220,7 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe
/**
* Constructor
*
* @param mainFrame
* @param mainFrame Main frame
*/
public ProxyFrame(final MainFrame mainFrame) {

View File

@@ -66,7 +66,7 @@ public class SWFListModel implements ListModel<Replacement> {
/**
* Called when data in a replacement changed
*
* @param index
* @param index Index of which SWF changed
*/
public void dataChanged(int index) {
if (index == -1) {

View File

@@ -394,7 +394,7 @@ public interface Advapi32 extends StdCallLibrary {
public int RegSetValueEx(HKEY hKey, String lpValueName, int Reserved, int dwType,
byte[] lpData, int cbData);
/**
/* *
*
* @param hKey
* @param lpSubKey
@@ -413,7 +413,7 @@ public interface Advapi32 extends StdCallLibrary {
int dwOptions, int samDesired, SECURITY_ATTRIBUTES lpSecurityAttributes,
HKEYByReference phkResult, IntByReference lpdwDisposition);
/**
/*
*
* @param hKey
* @param name

View File

@@ -303,7 +303,7 @@ public interface Gdi32 extends StdCallLibrary {
*/
int GetDeviceCaps(HDC hdc, int nIndex);
/**
/* *
* The GetDIBits function retrieves the bits fo the specified compatible
* bitmap and copies them into a buffer as a DIB using the specified format.
*

View File

@@ -27,7 +27,7 @@ public interface Shell32 extends StdCallLibrary {
Shell32 INSTANCE = (Shell32) Native.loadLibrary("shell32", Shell32.class,
W32APIOptions.UNICODE_OPTIONS);
/**
/* *
* @param lpExecInfo
* @return true if successful. Otherwise false.
*/

View File

@@ -952,7 +952,7 @@ public interface User32 extends StdCallLibrary, WinUser {
*/
DWORD SendInput(DWORD nInputs, WinUser.INPUT[] pInputs, int cbSize);
/**
/* *
* Waits until the specified process has finished processing its initial
* input and is waiting for user input with no input pending, or until the
* time-out interval has elapsed.
@@ -1099,7 +1099,7 @@ public interface User32 extends StdCallLibrary, WinUser {
*/
boolean CloseWindow(HWND hWnd);
/**
/* *
* Defines a system-wide hot key.
*
* @param hWnd A handle to the window that will receive
@@ -1199,7 +1199,7 @@ public interface User32 extends StdCallLibrary, WinUser {
*/
public boolean UnregisterClass(WString lpClassName, HINSTANCE hInstance);
/**
/* *
* Creates an overlapped, pop-up, or child window with an extended window
* style; otherwise, this function is identical to the CreateWindow
* function. For more information about creating a window and for full

View File

@@ -1,181 +1,181 @@
/* Copyright (c) 2010,2011 Daniel Doubrovkine, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32;
import com.sun.jna.platform.win32.WinNT.HRESULT;
// TODO: Auto-generated Javadoc
/**
* Utility class for some common error functions.
*/
public abstract class W32Errors implements WinError {
/**
* Generic test for success on any status value (non-negative numbers
* indicate success).
*
* @param hr the hr
* @return true, if successful
*/
public static final boolean SUCCEEDED(int hr) {
return hr >= 0;
}
/**
* and the inverse.
*
* @param hr the hr
* @return true, if successful
*/
public static final boolean FAILED(int hr) {
return hr < 0;
}
/**
* Succeeded.
*
* @param hr the hr
* @return true, if successful
*/
public static final boolean SUCCEEDED(HRESULT hr) {
if (hr != null) {
return SUCCEEDED(hr.intValue());
} else {
return false;
}
}
/**
* Failed.
*
* @param hr the hr
* @return true, if successful
*/
public static final boolean FAILED(HRESULT hr) {
if (hr != null) {
return FAILED(hr.intValue());
} else {
return false;
}
}
/**
* Extract error code from HRESULT.
*
* @param hr the hr
* @return the int
*/
public static final int HRESULT_CODE(int hr) {
return hr & 0xFFFF;
}
/**
* Extract error code from SCODE.
*
* @param sc the sc
* @return the int
*/
public static final int SCODE_CODE(int sc) {
return sc & 0xFFFF;
}
/**
* Return the facility.
*
* @param hr the hr
* @return the int
*/
public static final int HRESULT_FACILITY(int hr) {
return (hr >>= 16) & 0x1fff;
}
/**
* Scode facility.
*
* @param sc the sc
* @return the int
*/
public static final int SCODE_FACILITY(short sc) {
return (sc >>= 16) & 0x1fff;
}
/**
* Return the severity.
*
* @param hr the hr
* @return the short
*/
public static short HRESULT_SEVERITY(int hr) {
return (short) ((hr >>= 31) & 0x1);
}
/**
* Scode severity.
*
* @param sc the sc
* @return the short
*/
public static short SCODE_SEVERITY(short sc) {
return (short) ((sc >>= 31) & 0x1);
}
/**
* Create an HRESULT value from component pieces.
*
* @param sev the sev
* @param fac the fac
* @param code the code
* @return the int
*/
public static int MAKE_HRESULT(short sev, short fac, short code) {
return ((sev << 31) | (fac << 16) | code);
}
/**
* Make scode.
*
* @param sev the sev
* @param fac the fac
* @param code the code
* @return the int
*/
public static final int MAKE_SCODE(short sev, short fac, short code) {
return ((sev << 31) | (fac << 16) | code);
}
/**
* Map a WIN32 error value into a HRESULT Note: This assumes that WIN32
* errors fall in the range -32k to=32k.
*
* @param x original w32 error code
* @return the converted value
*/
public static final HRESULT HRESULT_FROM_WIN32(int x) {
int f = FACILITY_WIN32;
return new HRESULT(x <= 0 ? x : ((x) & 0x0000FFFF) | (f <<= 16)
| 0x80000000);
}
/**
* FACILITY_USERMODE_FILTER_MANAGER
*
* Translation macro for converting: NTSTATUS --> HRESULT.
*
* @param x the x
* @return the int
*/
public static final int FILTER_HRESULT_FROM_FLT_NTSTATUS(int x) {
int f = FACILITY_USERMODE_FILTER_MANAGER;
return (((x) & 0x8000FFFF) | (f <<= 16));
}
}
/* Copyright (c) 2010,2011 Daniel Doubrovkine, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32;
import com.sun.jna.platform.win32.WinNT.HRESULT;
// TODO: Auto-generated Javadoc
/**
* Utility class for some common error functions.
*/
public abstract class W32Errors implements WinError {
/**
* Generic test for success on any status value (non-negative numbers
* indicate success).
*
* @param hr the hr
* @return true, if successful
*/
public static final boolean SUCCEEDED(int hr) {
return hr >= 0;
}
/**
* and the inverse.
*
* @param hr the hr
* @return true, if successful
*/
public static final boolean FAILED(int hr) {
return hr < 0;
}
/**
* Succeeded.
*
* @param hr the hr
* @return true, if successful
*/
public static final boolean SUCCEEDED(HRESULT hr) {
if (hr != null) {
return SUCCEEDED(hr.intValue());
} else {
return false;
}
}
/**
* Failed.
*
* @param hr the hr
* @return true, if successful
*/
public static final boolean FAILED(HRESULT hr) {
if (hr != null) {
return FAILED(hr.intValue());
} else {
return false;
}
}
/**
* Extract error code from HRESULT.
*
* @param hr the hr
* @return the int
*/
public static final int HRESULT_CODE(int hr) {
return hr & 0xFFFF;
}
/**
* Extract error code from SCODE.
*
* @param sc the sc
* @return the int
*/
public static final int SCODE_CODE(int sc) {
return sc & 0xFFFF;
}
/**
* Return the facility.
*
* @param hr the hr
* @return the int
*/
public static final int HRESULT_FACILITY(int hr) {
return (hr >>= 16) & 0x1fff;
}
/**
* Scode facility.
*
* @param sc the sc
* @return the int
*/
public static final int SCODE_FACILITY(short sc) {
return (sc >>= 16) & 0x1fff;
}
/**
* Return the severity.
*
* @param hr the hr
* @return the short
*/
public static short HRESULT_SEVERITY(int hr) {
return (short) ((hr >>= 31) & 0x1);
}
/**
* Scode severity.
*
* @param sc the sc
* @return the short
*/
public static short SCODE_SEVERITY(short sc) {
return (short) ((sc >>= 31) & 0x1);
}
/**
* Create an HRESULT value from component pieces.
*
* @param sev the sev
* @param fac the fac
* @param code the code
* @return the int
*/
public static int MAKE_HRESULT(short sev, short fac, short code) {
return ((sev << 31) | (fac << 16) | code);
}
/**
* Make scode.
*
* @param sev the sev
* @param fac the fac
* @param code the code
* @return the int
*/
public static final int MAKE_SCODE(short sev, short fac, short code) {
return ((sev << 31) | (fac << 16) | code);
}
/**
* Map a WIN32 error value into a HRESULT Note: This assumes that WIN32
* errors fall in the range -32k to=32k.
*
* @param x original w32 error code
* @return the converted value
*/
public static final HRESULT HRESULT_FROM_WIN32(int x) {
int f = FACILITY_WIN32;
return new HRESULT(x <= 0 ? x : ((x) & 0x0000FFFF) | (f <<= 16)
| 0x80000000);
}
/* *
* FACILITY_USERMODE_FILTER_MANAGER
*
* Translation macro for converting: NTSTATUS --> HRESULT.
*
* @param x the x
* @return the int
*/
public static final int FILTER_HRESULT_FROM_FLT_NTSTATUS(int x) {
int f = FACILITY_USERMODE_FILTER_MANAGER;
return (((x) & 0x8000FFFF) | (f <<= 16));
}
}

View File

@@ -346,7 +346,7 @@ public interface WinNT extends WinError, WinDef, WinBase, BaseTSD {
Privileges = new LUID_AND_ATTRIBUTES[nbOfPrivileges];
}
/**
/* *
* Initialize a TOKEN_PRIVILEGES instance from initialized memory.
*
* @param p
@@ -671,7 +671,7 @@ public interface WinNT extends WinError, WinDef, WinBase, BaseTSD {
allocateMemory(size);
}
/**
/* *
* WARNING: this filename may be either the short or long form of the
* filename.
*
@@ -1030,7 +1030,7 @@ public interface WinNT extends WinError, WinDef, WinBase, BaseTSD {
immutable = true;
}
/**
/* *
* Override to the appropriate object for INVALID_HANDLE_VALUE.
*
* @param nativeValue

View File

@@ -265,7 +265,7 @@ public interface WinUser extends StdCallLibrary, WinDef {
public interface WNDENUMPROC extends StdCallCallback {
/**
/* *
* Return whether to continue enumeration.
*
* @param hWnd