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

## org.springframework.aop.target
Class EmptyTargetSource

    java.lang.Object
      org.springframework.aop.target.EmptyTargetSource

All Implemented Interfaces:
  java.io.Serializable, TargetClassAware, TargetSource

    public class EmptyTargetSource

extends java.lang.Object
implements TargetSource, java.io.Serializable

Canonical `TargetSource` when there is no target (or just the target class known), and behavior is supplied by interfaces and advisors only.

Author:
  Rod Johnson, Juergen Hoeller
See Also:
  Serialized Form

Field Summary
`static EmptyTargetSource` | `INSTANCE` The canonical (Singleton) instance of this `EmptyTargetSource`.

Method Summary
`boolean` | `equals(java.lang.Object other)`
`static EmptyTargetSource` | `forClass(java.lang.Class targetClass)` Return an EmptyTargetSource for the given target Class.
`static EmptyTargetSource` | `forClass(java.lang.Class targetClass, boolean isStatic)` Return an EmptyTargetSource for the given target Class.
`java.lang.Object` | `getTarget()` Always returns `null`.
`java.lang.Class<?>` | `getTargetClass()` Always returns the specified target Class, or `null` if none.
`int` | `hashCode()`
`boolean` | `isStatic()` Always returns `true`.
`void` | `releaseTarget(java.lang.Object target)` Nothing to release.
`java.lang.String` | `toString()`

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

Field Detail

### INSTANCE

    public static final EmptyTargetSource INSTANCE

  The canonical (Singleton) instance of this `EmptyTargetSource`.

Method Detail

### forClass

    public static EmptyTargetSource forClass(java.lang.Class targetClass)

  Return an EmptyTargetSource for the given target Class.

  Parameters:
    `targetClass` - the target Class (may be `null`)
  See Also:
    `getTargetClass()`

### forClass

    public static EmptyTargetSource forClass(java.lang.Class targetClass,
                                             boolean isStatic)

  Return an EmptyTargetSource for the given target Class.

  Parameters:
    `targetClass` - the target Class (may be `null`)
    `isStatic` - whether the TargetSource should be marked as static
  See Also:
    `getTargetClass()`

### getTargetClass

    public java.lang.Class<?> getTargetClass()

  Always returns the specified target Class, or `null` if none.

  Specified by:
    `getTargetClass` in interface `TargetClassAware`
  Specified by:
    `getTargetClass` in interface `TargetSource`
  Returns:
    the type of targets returned by this `TargetSource`

### isStatic

    public boolean isStatic()

  Always returns `true`.

  Specified by:
    `isStatic` in interface `TargetSource`
  Returns:
    `true` if the target is immutable
  See Also:
    `TargetSource.getTarget()`

### getTarget

    public java.lang.Object getTarget()

  Always returns `null`.

  Specified by:
    `getTarget` in interface `TargetSource`
  Returns:
    the target object, which contains the joinpoint

### releaseTarget

    public void releaseTarget(java.lang.Object target)

  Nothing to release.

  Specified by:
    `releaseTarget` in interface `TargetSource`
  Parameters:
    `target` - object obtained from a call to `TargetSource.getTarget()`

### equals

    public boolean equals(java.lang.Object other)

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

### hashCode

    public int hashCode()

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

### toString

    public java.lang.String toString()

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

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