com.opensymphony.xwork2.config.impl

## Class LocatableFactory<T>

- java.lang.Object
- - com.opensymphony.xwork2.util.location.Located
  - - com.opensymphony.xwork2.config.impl.LocatableFactory<T>

- All Implemented Interfaces:
    Factory<T>, Locatable

      public class LocatableFactory<T>
      extends Located
      implements Factory<T>

  Attaches location information to the factory.

- - ### Field Summary

    - ### Fields inherited from class com.opensymphony.xwork2.util.location.Located

      `location`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocatableFactory(String name, Class type, Class implementation, Scope scope, Object location)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `create(Context context)` Creates an object to be injected.
    `String` | `toString()`
    `Class<? extends T>` | `type()` Returns a class of

    - ### Methods inherited from class com.opensymphony.xwork2.util.location.Located

      `getLocation, setLocation`

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

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

- - ### Constructor Detail

    - #### LocatableFactory

          public LocatableFactory(String name,
                                  Class type,
                                  Class implementation,
                                  Scope scope,
                                  Object location)

  - ### Method Detail

    - #### create

          public T create(Context context)

      Description copied from interface: `Factory`
      Creates an object to be injected.
      Specified by:
        `create` in interface `Factory<T>`
      Parameters:
        `context` - of this injection
      Returns:
        instance to be injected

    - #### type

          public Class<? extends T> type()

      Description copied from interface: `Factory`
      Returns a class of
      Specified by:
        `type` in interface `Factory<T>`
      Returns:
        class of the object

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2000–2025 Apache Software Foundation. All rights reserved.