From a7e79a9570cdca4e578c458189a0defc4580682e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 6 Apr 2015 06:32:40 +0200 Subject: [PATCH] Javadoc warnings fixed (Some JNA docs also changed to standard comments) --- .../console/CommandLineArgumentParser.java | 4 +- .../jpexs/decompiler/flash/gui/FontPanel.java | 2 +- .../flash/gui/FontPreviewDialog.java | 6 +- .../decompiler/flash/gui/LicenseUpdater.java | 2 +- .../jpexs/decompiler/flash/gui/LinkLabel.java | 9 +- src/com/jpexs/decompiler/flash/gui/Main.java | 2 +- .../decompiler/flash/gui/SearchListener.java | 2 +- .../decompiler/flash/gui/SearchPanel.java | 2 +- .../flash/gui/SearchResultsDialog.java | 2 +- .../decompiler/flash/gui/abc/MyMarkers.java | 16 +- .../flash/gui/helpers/SpringUtilities.java | 6 +- .../flash/gui/proxy/ProxyFrame.java | 2 +- .../flash/gui/proxy/SWFListModel.java | 2 +- src/com/sun/jna/platform/win32/Advapi32.java | 4 +- src/com/sun/jna/platform/win32/Gdi32.java | 2 +- src/com/sun/jna/platform/win32/Shell32.java | 2 +- src/com/sun/jna/platform/win32/User32.java | 6 +- src/com/sun/jna/platform/win32/W32Errors.java | 362 +++++++++--------- src/com/sun/jna/platform/win32/WinNT.java | 6 +- src/com/sun/jna/platform/win32/WinUser.java | 2 +- 20 files changed, 221 insertions(+), 220 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java index 360732b6f..b9e86fc01 100644 --- a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java +++ b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java @@ -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; diff --git a/src/com/jpexs/decompiler/flash/gui/FontPanel.java b/src/com/jpexs/decompiler/flash/gui/FontPanel.java index 1388fd259..45d6550ad 100644 --- a/src/com/jpexs/decompiler/flash/gui/FontPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/FontPanel.java @@ -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; diff --git a/src/com/jpexs/decompiler/flash/gui/FontPreviewDialog.java b/src/com/jpexs/decompiler/flash/gui/FontPreviewDialog.java index 605c8134d..8585bdec3 100644 --- a/src/com/jpexs/decompiler/flash/gui/FontPreviewDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/FontPreviewDialog.java @@ -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(); diff --git a/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java b/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java index 9fa6f3ccd..dab8ea06f 100644 --- a/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java +++ b/src/com/jpexs/decompiler/flash/gui/LicenseUpdater.java @@ -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) { diff --git a/src/com/jpexs/decompiler/flash/gui/LinkLabel.java b/src/com/jpexs/decompiler/flash/gui/LinkLabel.java index af0659e3f..ce18665b8 100644 --- a/src/com/jpexs/decompiler/flash/gui/LinkLabel.java +++ b/src/com/jpexs/decompiler/flash/gui/LinkLabel.java @@ -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) { diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index f1780e92b..36b690c21 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -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 { diff --git a/src/com/jpexs/decompiler/flash/gui/SearchListener.java b/src/com/jpexs/decompiler/flash/gui/SearchListener.java index 3c2ca21bf..2b19259d6 100644 --- a/src/com/jpexs/decompiler/flash/gui/SearchListener.java +++ b/src/com/jpexs/decompiler/flash/gui/SearchListener.java @@ -19,7 +19,7 @@ package com.jpexs.decompiler.flash.gui; /** * * @author JPEXS - * @param + * @param Element to search */ public interface SearchListener { diff --git a/src/com/jpexs/decompiler/flash/gui/SearchPanel.java b/src/com/jpexs/decompiler/flash/gui/SearchPanel.java index cd11f180c..f8f060180 100644 --- a/src/com/jpexs/decompiler/flash/gui/SearchPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/SearchPanel.java @@ -31,7 +31,7 @@ import jsyntaxpane.actions.DocumentSearchData; /** * * @author JPEXS - * @param + * @param Element to search */ public class SearchPanel extends JPanel implements ActionListener { diff --git a/src/com/jpexs/decompiler/flash/gui/SearchResultsDialog.java b/src/com/jpexs/decompiler/flash/gui/SearchResultsDialog.java index 3fdc22ee7..2e77a0062 100644 --- a/src/com/jpexs/decompiler/flash/gui/SearchResultsDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/SearchResultsDialog.java @@ -35,7 +35,7 @@ import javax.swing.JScrollPane; /** * * @author JPEXS - * @param + * @param Element to search */ public class SearchResultsDialog extends AppDialog implements ActionListener { diff --git a/src/com/jpexs/decompiler/flash/gui/abc/MyMarkers.java b/src/com/jpexs/decompiler/flash/gui/abc/MyMarkers.java index 8ff42a390..53fc8c82b 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/MyMarkers.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/MyMarkers.java @@ -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 { diff --git a/src/com/jpexs/decompiler/flash/gui/helpers/SpringUtilities.java b/src/com/jpexs/decompiler/flash/gui/helpers/SpringUtilities.java index 3ea66924c..d45bd6e0c 100644 --- a/src/com/jpexs/decompiler/flash/gui/helpers/SpringUtilities.java +++ b/src/com/jpexs/decompiler/flash/gui/helpers/SpringUtilities.java @@ -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 diff --git a/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java b/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java index 22a745043..fcd456691 100644 --- a/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java +++ b/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java @@ -220,7 +220,7 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe /** * Constructor * - * @param mainFrame + * @param mainFrame Main frame */ public ProxyFrame(final MainFrame mainFrame) { diff --git a/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java b/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java index 504ba71ac..72681d951 100644 --- a/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java +++ b/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java @@ -66,7 +66,7 @@ public class SWFListModel implements ListModel { /** * Called when data in a replacement changed * - * @param index + * @param index Index of which SWF changed */ public void dataChanged(int index) { if (index == -1) { diff --git a/src/com/sun/jna/platform/win32/Advapi32.java b/src/com/sun/jna/platform/win32/Advapi32.java index 9d6681537..ee65ebbdb 100644 --- a/src/com/sun/jna/platform/win32/Advapi32.java +++ b/src/com/sun/jna/platform/win32/Advapi32.java @@ -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 diff --git a/src/com/sun/jna/platform/win32/Gdi32.java b/src/com/sun/jna/platform/win32/Gdi32.java index 88756dfc2..85316ee6d 100644 --- a/src/com/sun/jna/platform/win32/Gdi32.java +++ b/src/com/sun/jna/platform/win32/Gdi32.java @@ -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. * diff --git a/src/com/sun/jna/platform/win32/Shell32.java b/src/com/sun/jna/platform/win32/Shell32.java index 227449f7b..2688caea4 100644 --- a/src/com/sun/jna/platform/win32/Shell32.java +++ b/src/com/sun/jna/platform/win32/Shell32.java @@ -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. */ diff --git a/src/com/sun/jna/platform/win32/User32.java b/src/com/sun/jna/platform/win32/User32.java index 0efe231d4..71fc877bf 100644 --- a/src/com/sun/jna/platform/win32/User32.java +++ b/src/com/sun/jna/platform/win32/User32.java @@ -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 diff --git a/src/com/sun/jna/platform/win32/W32Errors.java b/src/com/sun/jna/platform/win32/W32Errors.java index 4bd8bf3e7..02631f460 100644 --- a/src/com/sun/jna/platform/win32/W32Errors.java +++ b/src/com/sun/jna/platform/win32/W32Errors.java @@ -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)); + } +} diff --git a/src/com/sun/jna/platform/win32/WinNT.java b/src/com/sun/jna/platform/win32/WinNT.java index 0b1079914..f48212407 100644 --- a/src/com/sun/jna/platform/win32/WinNT.java +++ b/src/com/sun/jna/platform/win32/WinNT.java @@ -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 diff --git a/src/com/sun/jna/platform/win32/WinUser.java b/src/com/sun/jna/platform/win32/WinUser.java index 5344d9c45..e6be6aa1d 100644 --- a/src/com/sun/jna/platform/win32/WinUser.java +++ b/src/com/sun/jna/platform/win32/WinUser.java @@ -265,7 +265,7 @@ public interface WinUser extends StdCallLibrary, WinDef { public interface WNDENUMPROC extends StdCallCallback { - /** + /* * * Return whether to continue enumeration. * * @param hWnd