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.
  • 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