Package org.spongepowered.asm.transformers

## Class TreeTransformer

- java.lang.Object
- - org.spongepowered.asm.transformers.TreeTransformer

- All Implemented Interfaces:
    `ILegacyClassTransformer`, `ITransformer`

      public abstract class TreeTransformer
      extends java.lang.Object
      implements ILegacyClassTransformer

  Base class for transformers which work with ASM tree model

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TreeTransformer()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected org.objectweb.asm.tree.ClassNode` | `readClass​(java.lang.String className, byte[] basicClass)` |
    `protected org.objectweb.asm.tree.ClassNode` | `readClass​(java.lang.String className, byte[] basicClass, boolean cacheReader)` |
    `protected byte[]` | `writeClass​(org.objectweb.asm.tree.ClassNode classNode)` |

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

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

    - ### Methods inherited from interface org.spongepowered.asm.service.ILegacyClassTransformer

      `transformClassBytes`

    - ### Methods inherited from interface org.spongepowered.asm.service.ITransformer

      `getName, isDelegationExcluded`

- - ### Constructor Detail

    - #### TreeTransformer

          public TreeTransformer()

  - ### Method Detail

    - #### readClass

          protected final org.objectweb.asm.tree.ClassNode readClass​(java.lang.String className,
                                                                     byte[] basicClass)

      Parameters:
        `basicClass` - Original bytecode
      Returns:
        tree

    - #### readClass

          protected final org.objectweb.asm.tree.ClassNode readClass​(java.lang.String className,
                                                                     byte[] basicClass,
                                                                     boolean cacheReader)

      Parameters:
        `basicClass` - Original bytecode
        `cacheReader` - True to cache the classReader instance for use when writing the generated ClassNode later
      Returns:
        tree

    - #### writeClass

          protected final byte[] writeClass​(org.objectweb.asm.tree.ClassNode classNode)

      Parameters:
        `classNode` - ClassNode to write out
      Returns:
        generated bytecode