Interface MethodConstant.CanCache

All Superinterfaces:
StackManipulation
All Known Implementing Classes:
MethodConstant.CanCacheIllegal, MethodConstant.ForConstructor, MethodConstant.ForMethod, MethodConstant.PrivilegedLookup
Enclosing class:
MethodConstant

public static interface MethodConstant.CanCache extends StackManipulation
Represents a MethodConstant that is directly loaded onto the operand stack without caching the value. Since the look-up of a Java method bares some costs that sometimes need to be avoided, such a stack manipulation offers a convenience method for defining this loading instruction as the retrieval of a field value that is initialized in the instrumented type's type initializer.
  • Method Details

    • cached

      Returns this method constant as a cached version.
      Returns:
      A cached version of the method constant that is represented by this instance.