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.internal.plastic
Class ClassInstantiatorImpl<T>

    java.lang.Object
      org.apache.tapestry5.internal.plastic.ClassInstantiatorImpl<T>

All Implemented Interfaces:
  ClassInstantiator<T>, InstanceContext

    public class ClassInstantiatorImpl<T>

extends java.lang.Object
implements ClassInstantiator<T>, InstanceContext

Method Summary
`
`<V> V`
` | `get(java.lang.Class<V> valueType)` Gets an instance context value which is identified by type.
`java.lang.Class<T>` | `getInstanceType()` Returns the type of the instance created with this context.
`T` | `newInstance()` Creates and returns a new instance of the transformed class.
`java.lang.String` | `toString()`
`
`<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`.

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

Method Detail

### with

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

  Description copied from interface: `ClassInstantiator`
  Returns a new instantiator that adds the indicated value to the instance's `InstanceContext`.

  Specified by:
    `with` in interface `ClassInstantiator<T>`
  Parameters:
    `valueType` - defines the type of value, and acts as a key to retrieve the value
    `instanceContextValue` - the non-null value stored

### get

    public <V> V get(java.lang.Class<V> valueType)

  Description copied from interface: `InstanceContext`
  Gets an instance context value which is identified by type.

  Specified by:
    `get` in interface `InstanceContext`

### newInstance

    public T newInstance()

  Description copied from interface: `ClassInstantiator`
  Creates and returns a new instance of the transformed class.

  Specified by:
    `newInstance` in interface `ClassInstantiator<T>`

### getInstanceType

    public java.lang.Class<T> getInstanceType()

  Description copied from interface: `InstanceContext`
  Returns the type of the instance created with this context. This is most often of interest to implementations of `ComputedValue`.

  Specified by:
    `getInstanceType` in interface `InstanceContext`

### toString

    public java.lang.String toString()

  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.