Class FieldViewModel


public class FieldViewModel extends MemberViewModel
This utility class renders Field objects into a more human-readable format. It can be used as a Java type renderer in Intellij-based IDE to support debugging.
  • Method Details

    • render

      public static FieldViewModel render(Clazz clazz, Field field)
      A wrapper utility method that wraps a Field object in a FieldViewModel
      Parameters:
      clazz - The Clazz that the Field belongs to.
      field - The Field object to be rendered.
      Returns:
      An abstract representation of the Field object.
    • renderPreview

      public String renderPreview()
      A utility method that renders a Field entry into a preview string, e.g., "public static int bar"
      Returns:
      A string previewing the constant pool entry.