Package org.pushingpixels.lafwidget.ant
Class LafMainClassAugmenter
java.lang.Object
org.pushingpixels.lafwidget.ant.LafMainClassAugmenter
Augments the main LAF classes with laf-widget behaviour. Is based on sample
adapter from ASM distribution.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Class adapter that augments the UI functionality. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
augmentClass
(String dir, String name) Augments a single class with additional UI behaviour.static void
Test methods.void
Processes a single file or a directory, augmenting all main LAF classes.void
setDelegatesToAdd
(String[] delegatesToAdd) Sets the list of delegates that need to be added.void
setVerbose
(boolean isVerbose) Sets the verbosity.
-
Field Details
-
METHOD_NAME
Method name to augment.
-
-
Constructor Details
-
LafMainClassAugmenter
public LafMainClassAugmenter()Creates a new augmenter.
-
-
Method Details
-
augmentClass
Augments a single class with additional UI behaviour.- Parameters:
dir
- Root directory for the library that contains the class.name
- Fully-qualified class name.- Returns:
- The superclass name.
- Throws:
AugmentException
- If the augmentation process failed.
-
process
Processes a single file or a directory, augmenting all main LAF classes.- Parameters:
toStrip
- The leading prefix to strip from the file names. Is used to create fully-qualified class name.file
- File resource (can point to a single file or to a directory).mainClassName
- The class name of the main LAF class.- Throws:
AugmentException
- If the augmentation process failed.
-
setVerbose
public void setVerbose(boolean isVerbose) Sets the verbosity.- Parameters:
isVerbose
- New value for augmentation process verbosity.
-
setDelegatesToAdd
Sets the list of delegates that need to be added.- Parameters:
delegatesToAdd
- The list of delegates that need to be added.
-
main
Test methods.- Parameters:
args
-- Throws:
AugmentException
-