Class InjectedElementAttributes

java.lang.Object
org.springframework.beans.factory.generator.config.InjectedElementAttributes

public class InjectedElementAttributes extends Object
Resolved attributes of an injected element.
Since:
6.0
Author:
Stephane Nicoll
  • Method Details

    • isResolved

      public boolean isResolved()
      Specify if the attributes have been resolved.
      Returns:
      the resolution of the injection
    • ifResolved

      public void ifResolved(Runnable task)
      Run the specified task only if this instance is resolved.
      Parameters:
      task - the task to invoke if attributes are available
    • ifResolved

      Invoke the specified Consumer with the resolved attributes.
      Parameters:
      attributes - the consumer to invoke if this instance is resolved
    • get

      public <T> T get(int index)
      Return the resolved attribute at the specified index.
      Type Parameters:
      T - the type of the attribute
      Parameters:
      index - the attribute index
      Returns:
      the attribute
    • get

      public <T> T get(int index, Class<T> type)
      Return the resolved attribute at the specified index.
      Type Parameters:
      T - the type of the attribute
      Parameters:
      index - the attribute index
      type - the attribute type
      Returns:
      the attribute