Package org.pushingpixels.lafwidget.ant

# Class LafMainClassAugmenter

java.lang.Object
org.pushingpixels.lafwidget.ant.LafMainClassAugmenter

public class LafMainClassAugmenter extends Object
Augments the main LAF classes with laf-widget behaviour. Is based on sample adapter from ASM distribution.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected class`
`LafMainClassAugmenter.AugmentClassAdapter`
Class adapter that augments the UI functionality.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static String`
`METHOD_NAME`
Method name to augment.

## Constructor Summary

Constructors
Constructor
Description
`LafMainClassAugmenter()`
Creates a new augmenter.

## Method Summary

Modifier and Type
Method
Description
`protected String`
`augmentClass(String dir, String name)`
Augments a single class with additional UI behaviour.
`static void`
`main(String[] args)`
Test methods.
`void`
`process(String toStrip, File file, String mainClassName)`
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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### METHOD_NAME

protected static String METHOD_NAME
Method name to augment.

## Constructor Details

### LafMainClassAugmenter

public LafMainClassAugmenter()
Creates a new augmenter.

## Method Details

### augmentClass

protected String augmentClass(String dir, String name)
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

public void process(String toStrip, File file, String mainClassName)
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

public void setDelegatesToAdd(String[] delegatesToAdd)
Sets the list of delegates that need to be added.

Parameters:
  `delegatesToAdd` - The list of delegates that need to be added.

### main

public static void main(String[] args) throws AugmentException
Test methods.

Parameters:
  `args` -
Throws:
  `AugmentException`