Class ZMethod

java.lang.Object
dxt.scanpath.v2.bc.ZMethod

public class ZMethod extends Object
Encapsulates metadata for a method read directly from a class file.

The metadata includes the method name, access modifiers, and the types of its annotations that are visible at runtime.

Author:
indroneel
  • Constructor Details

    • ZMethod

      public ZMethod(ZClassContext ctxt, MethodModel mthdMod)
      Creates method metadata from a class-file method model.
      Parameters:
      ctxt - the class context used to resolve annotation types
      mthdMod - the class-file model of the method
  • Method Details

    • getName

      public String getName()
      Returns the method name.
      Returns:
      the method name
    • isStatic

      public boolean isStatic()
      Indicates whether the method has the static modifier.
      Returns:
      true if the method is static; otherwise, false
    • isAbstract

      public boolean isAbstract()
      Indicates whether the method has the abstract modifier.
      Returns:
      true if the method is abstract; otherwise, false
    • isNative

      public boolean isNative()
      Indicates whether the method has the native modifier.
      Returns:
      true if the method is native; otherwise, false
    • getAnnotations

      public List<ZClass> getAnnotations()
      Returns the types of the method's runtime-visible annotations.
      Returns:
      the method's annotation types