Package org.springframework.cglib.core

# Class DefaultGeneratorStrategy

java.lang.Object
org.springframework.cglib.core.DefaultGeneratorStrategy

All Implemented Interfaces:
  `GeneratorStrategy`

Direct Known Subclasses:
  `ClassLoaderAwareGeneratorStrategy`, `UndeclaredThrowableStrategy`

public class DefaultGeneratorStrategy extends Object implements GeneratorStrategy

## Field Summary

Fields
Modifier and Type
Field
Description
`static final DefaultGeneratorStrategy`
`INSTANCE`

## Constructor Summary

Constructors
Constructor
Description
`DefaultGeneratorStrategy()`

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`generate(ClassGenerator cg)`
Generate the class.
`protected DebuggingClassWriter`
`getClassVisitor()`
`protected final ClassWriter`
`getClassWriter()`
`protected byte[]`
`transform(byte[] b)`
`protected ClassGenerator`
`transform(ClassGenerator cg)`

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

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

### Methods inherited from interface org.springframework.cglib.core.GeneratorStrategy

`equals`

## Field Details

### INSTANCE

public static final DefaultGeneratorStrategy INSTANCE

## Constructor Details

### DefaultGeneratorStrategy

public DefaultGeneratorStrategy()

## Method Details

### generate

public byte[] generate(ClassGenerator cg) throws Exception
Description copied from interface: `GeneratorStrategy`
Generate the class.

Specified by:
  `generate` in interface `GeneratorStrategy`
Parameters:
  `cg` - a class generator on which you can call `ClassGenerator.generateClass(org.springframework.asm.ClassVisitor)`
Returns:
  a byte array containing the bits of a valid Class
Throws:
  `Exception`

### getClassVisitor

protected DebuggingClassWriter getClassVisitor() throws Exception

Throws:
  `Exception`

### getClassWriter

protected final ClassWriter getClassWriter()

### transform

protected byte[] transform(byte[] b) throws Exception

Throws:
  `Exception`

### transform

protected ClassGenerator transform(ClassGenerator cg) throws Exception

Throws:
  `Exception`