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.plastic
Interface ClassInstantiator<T>

All Known Implementing Classes:
  ClassInstantiatorImpl

    public interface ClassInstantiator<T>

The end result of a class transformation is a ClassInstantiator that can be used to instantiate an instance of the transformed class.

Method Summary
`T` | `newInstance()` Creates and returns a new instance of the transformed class.
`
`<V> ClassInstantiator<T>`
` | `with(java.lang.Class<V> valueType, V instanceContextValue)` Returns a new instantiator that adds the indicated value to the instance's `InstanceContext`.

Method Detail

### newInstance

    T newInstance()

  Creates and returns a new instance of the transformed class.

### with

    <V> ClassInstantiator<T> with(java.lang.Class<V> valueType,
                                  V instanceContextValue)

  Returns a new instantiator that adds the indicated value to the instance's `InstanceContext`.

  Parameters:
    `valueType` - defines the type of value, and acts as a key to retrieve the value
    `instanceContextValue` - the non-null value stored
  Throws:
    `java.lang.AssertionError` - if instanceContextValue is null
    `java.lang.IllegalStateException` - if a value of the given value type has already been stored

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.