play

## Class Invoker.InvocationContext

- java.lang.Object
- - play.Invoker.InvocationContext

Enclosing class:
  Invoker

    public static class Invoker.InvocationContext
    extends java.lang.Object

The class/method that will be invoked by the current operation

### Field Summary

Fields
`static java.lang.ThreadLocal<Invoker.InvocationContext>` `current`

### Constructor Summary

Constructors
Constructor and Description
`InvocationContext(java.lang.String invocationType)`
`InvocationContext(java.lang.String invocationType, java.lang.annotation.Annotation[]... annotations)`
`InvocationContext(java.lang.String invocationType, java.lang.annotation.Annotation[] annotations)`
`InvocationContext(java.lang.String invocationType, java.util.List<java.lang.annotation.Annotation> annotations)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static Invoker.InvocationContext` `current()`
`<T extends java.lang.annotation.Annotation> T` `getAnnotation(java.lang.Class<T> clazz)`
`java.util.List<java.lang.annotation.Annotation>` `getAnnotations()`
`java.lang.String` `getInvocationType()` Returns the InvocationType for this invocation - Ie: A plugin can use this to find out if it runs in the context of a background Job
`<T extends java.lang.annotation.Annotation> boolean` `isAnnotationPresent(java.lang.Class<T> clazz)`
`java.lang.String` `toString()`

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

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

### Field Detail

#### current

    public static final java.lang.ThreadLocal<Invoker.InvocationContext> current

### Constructor Detail

#### InvocationContext

    public InvocationContext(java.lang.String invocationType)

#### InvocationContext

    public InvocationContext(java.lang.String invocationType,
                             java.util.List<java.lang.annotation.Annotation> annotations)

#### InvocationContext

    public InvocationContext(java.lang.String invocationType,
                             java.lang.annotation.Annotation[] annotations)

#### InvocationContext

    public InvocationContext(java.lang.String invocationType,
                             java.lang.annotation.Annotation[]... annotations)

### Method Detail

#### current

    public static Invoker.InvocationContext current()

#### getAnnotations

    public java.util.List<java.lang.annotation.Annotation> getAnnotations()

#### getAnnotation

    public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> clazz)

#### isAnnotationPresent

    public <T extends java.lang.annotation.Annotation> boolean isAnnotationPresent(java.lang.Class<T> clazz)

#### getInvocationType

    public java.lang.String getInvocationType()

Returns the InvocationType for this invocation - Ie: A plugin can use this to find out if it runs in the context of a background Job

Returns:
  the InvocationType for this invocation

#### toString

    public java.lang.String toString()

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