Package org.pushingpixels.lafwidget.ant
Class Utils
- java.lang.Object
-
- org.pushingpixels.lafwidget.ant.Utils
-
public class Utils extends Object
Utility functions.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
getMethodDesc(Method method)
Returns JNI-compliant description of the specified method.static String
getTypeDesc(Class<?> clazz)
Returns JNI-compliant description of the specified class (type).String
getUIDelegate(String uiKey, Class<?> origLafClazz)
Returns fully-qualified class name for the UI delegate based on the specified parameters.String
getUIDelegate(String uiKey, String lafClassName)
Returns fully-qualified class name for the UI delegate based on the specified parameters.static Utils
getUtils()
Returns instance.static void
main(String[] args)
Test app.
-
-
-
Method Detail
-
getUtils
public static Utils getUtils()
Returns instance.- Returns:
- Instance.
-
getUIDelegate
public String getUIDelegate(String uiKey, String lafClassName)
Returns fully-qualified class name for the UI delegate based on the specified parameters.- Parameters:
uiKey
- UI key.lafClassName
- Class name of the LAF.- Returns:
- Fully-qualified class name for the UI delegate. The LAF hierarchy
is searched starting from the specified class name and up. For
example, if the second parameter points to
MetalLookAndFeel
, the metal delegate classname is returned if exists; otherwise the basic delegate classname is returned.
-
getUIDelegate
public String getUIDelegate(String uiKey, Class<?> origLafClazz)
Returns fully-qualified class name for the UI delegate based on the specified parameters.- Parameters:
uiKey
- UI key.origLafClazz
- LAF class.- Returns:
- Fully-qualified class name for the UI delegate. The LAF hierarchy
is searched starting from the specified class and up. For
example, if the second parameter points to
MetalLookAndFeel
, the metal delegate classname is returned if exists; otherwise the basic delegate classname is returned.
-
getTypeDesc
public static String getTypeDesc(Class<?> clazz)
Returns JNI-compliant description of the specified class (type). For example, forJButton[]
this function will return[Ljavax/swing/JButton;
.- Parameters:
clazz
- Class.- Returns:
- JNI-compliant class (type) description.
-
getMethodDesc
public static String getMethodDesc(Method method)
Returns JNI-compliant description of the specified method. For example, forvoid installUI(JButton button)
this function will return(Ljavax/swing/JButton;)V
.- Parameters:
method
- Method.- Returns:
- JNI-compliant method description.
-
main
public static void main(String[] args)
Test app.- Parameters:
args
-
-
-