# Class InjectionTarget

java.lang.Object
org.apache.tomcat.util.descriptor.web.InjectionTarget

All Implemented Interfaces:
  `Serializable`

public class InjectionTarget extends Object implements Serializable
Represents a target for dependency injection. Defines the class and field/method to inject into.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InjectionTarget()`
  Creates a new injection target with no initial values.
  `InjectionTarget(String targetClass, String targetName)`
  Creates a new injection target with the specified class and name.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getTargetClass()`
  Returns the target class name.
  `String`
  `getTargetName()`
  Returns the target field or method name.
  `void`
  `setTargetClass(String targetClass)`
  Sets the target class name.
  `void`
  `setTargetName(String targetName)`
  Sets the target field or method name.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### InjectionTarget

    public InjectionTarget()
    Creates a new injection target with no initial values.

  - ### InjectionTarget

    public InjectionTarget(String targetClass, String targetName)
    Creates a new injection target with the specified class and name.
    Parameters:
      `targetClass` - the target class name
      `targetName` - the target field or method name

- ## Method Details

  - ### getTargetClass

    public String getTargetClass()
    Returns the target class name.
    Returns:
      the target class name

  - ### setTargetClass

    public void setTargetClass(String targetClass)
    Sets the target class name.
    Parameters:
      `targetClass` - the target class name

  - ### getTargetName

    public String getTargetName()
    Returns the target field or method name.
    Returns:
      the target name

  - ### setTargetName

    public void setTargetName(String targetName)
    Sets the target field or method name.
    Parameters:
      `targetName` - the target name