Interface Bootstrap


public interface Bootstrap
Represents an invoke dynamic bootstrap method which is bound to a method.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default Variable
    invoke(Object type, String name)
    Invoke a dynamically generated constant, or a dynamically generated method that has no parameters.
    invoke(Object returnType, String name, Object[] types, Object... values)
    Invoke a dynamically generated method.
  • Method Details

    • invoke

      default Variable invoke(Object type, String name)
      Invoke a dynamically generated constant, or a dynamically generated method that has no parameters.
      Parameters:
      type - constant type or method return type; can be null for void
      name - constant or method name
      Returns:
      the constant value, or the result of the method, which is null if void
      Throws:
      IllegalArgumentException - if the type is unsupported
    • invoke

      Variable invoke(Object returnType, String name, Object[] types, Object... values)
      Invoke a dynamically generated method.
      Parameters:
      returnType - method return type; can be null for void
      name - method name
      types - method parameter types; the entire array or individual elements can be null to infer the actual type from the corresponding value
      values - variables or constants
      Returns:
      the result of the method, which is null if void
      Throws:
      IllegalArgumentException - if a type is unsupported, or if a value isn't a variable or a supported constant
      IllegalStateException - if this is a condy bootstrap