Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.ioc.util
Class BodyBuilder

    java.lang.Object
      org.apache.tapestry5.ioc.util.BodyBuilder

Deprecated. In 5.3/0, to be removed in a later release

    public final class BodyBuilder

extends java.lang.Object

Utility class for assembling the body used with Javassist when defining a method or constructor. Basically, assists with formatting and with indentation. This makes the code that assembles a method body much simpler ... and it makes the result neater, which will be easier to debug (debugging dynamically generated code is hard enough that it should be easy to read the input code before worrying about why it doesn't compile or execute properly).

This class is not threadsafe.

Most of the methods return the BodyBuilder, to form a fluent interface.

Constructor Summary
`BodyBuilder()` Deprecated.

Method Summary
`BodyBuilder` | `add(java.lang.String format, java.lang.Object... args)` Deprecated. Adds text to the current line, without ending the line.
`BodyBuilder` | `addln(java.lang.String format, java.lang.Object... args)` Deprecated. Adds text to the current line and ends the line.
`BodyBuilder` | `begin()` Deprecated. Begins a new block.
`BodyBuilder` | `clear()` Deprecated. Clears the builder, returning it to its initial, empty state.
`BodyBuilder` | `end()` Deprecated. Ends the current block.
`java.lang.String` | `toString()` Deprecated. Returns the current contents of the buffer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BodyBuilder

    public BodyBuilder()

  Deprecated.

Method Detail

### clear

    public BodyBuilder clear()

  Deprecated.
  Clears the builder, returning it to its initial, empty state.

### add

    public BodyBuilder add(java.lang.String format,
                           java.lang.Object... args)

  Deprecated.
  Adds text to the current line, without ending the line.

  Parameters:
    `format` - string format, as per `Formatter`
    `args` - arguments referenced by format specifiers

### addln

    public BodyBuilder addln(java.lang.String format,
                             java.lang.Object... args)

  Deprecated.
  Adds text to the current line and ends the line.

  Parameters:
    `format` - string format, as per `Formatter`
    `args` - arguments referenced by format specifiers

### begin

    public BodyBuilder begin()

  Deprecated.
  Begins a new block. Emits a "{", properly indented, on a new line.

### end

    public BodyBuilder end()

  Deprecated.
  Ends the current block. Emits a "}", propertly indented, on a new line.

### toString

    public java.lang.String toString()

  Deprecated.
  Returns the current contents of the buffer. This value is often passed to methods such as `ClassFab.addConstructor(Class[], Class[], String)` or `ClassFab.addMethod(int, MethodSignature, String)`.

  A BodyBuilder can be used again after invoking toString(), typically by invoking `clear()`.

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.