Class FieldInfoData

java.lang.Object
org.fife.rsta.ac.java.FieldInfoData
All Implemented Interfaces:
IconFactory.IconData, MemberCompletion.Data

class FieldInfoData extends Object implements MemberCompletion.Data
Metadata about a field as read from a class file. This class is used by instances of FieldCompletion.
Version:
1.0
  • Field Details

  • Constructor Details

  • Method Details

    • getEnclosingClassName

      public String getEnclosingClassName(boolean fullyQualified)
      Description copied from interface: MemberCompletion.Data
      Returns the name of the enclosing class.
      Specified by:
      getEnclosingClassName in interface MemberCompletion.Data
      Parameters:
      fullyQualified - Whether the name returned should be fully qualified.
      Returns:
      The class name.
    • getIcon

      public String getIcon()
      Description copied from interface: IconFactory.IconData
      Returns the main icon to use when rendering this member's completion. This icon will be decorated appropriately based on whether it is abstract, deprecated, final, static, or any of the above.
      Specified by:
      getIcon in interface IconFactory.IconData
      Returns:
      The icon to use.
    • getSignature

      public String getSignature()
      Description copied from interface: MemberCompletion.Data
      Returns the signature of this member.
      Specified by:
      getSignature in interface MemberCompletion.Data
      Returns:
      The signature.
      See Also:
    • getSummary

      public String getSummary()
      Description copied from interface: MemberCompletion.Data
      Returns the summary description (should be HTML) for this member.
      Specified by:
      getSummary in interface MemberCompletion.Data
      Returns:
      The summary description, or null if there is none.
      See Also:
      • Completion.getSummary()
    • getSummaryFromSourceLoc

      private String getSummaryFromSourceLoc(SourceLocation loc, ClassFile cf)
      Scours the source in a location (zip file, directory), looking for a particular class's source. If it is found, it is parsed, and the Javadoc for this field (if any) is returned.
      Parameters:
      loc - The zip file, jar file, or directory to look in.
      cf - The ClassFile representing the class of this field.
      Returns:
      The summary, or null if the field has no javadoc, the class's source was not found, or an IO error occurred.
    • getType

      public String getType()
      Description copied from interface: MemberCompletion.Data
      Returns the type of this member (the return type for methods).
      Specified by:
      getType in interface MemberCompletion.Data
      Returns:
      The type of this member.
      See Also:
    • isAbstract

      public boolean isAbstract()
      Always returns false since fields cannot be abstract.
      Specified by:
      isAbstract in interface IconFactory.IconData
      Returns:
      false always.
    • isConstructor

      public boolean isConstructor()
      Always returns false, fields cannot be constructors.
      Specified by:
      isConstructor in interface MemberCompletion.Data
      Returns:
      false always.
    • isDeprecated

      public boolean isDeprecated()
      Description copied from interface: IconFactory.IconData
      Returns whether this icon represents a deprecated class/method/etc.
      Specified by:
      isDeprecated in interface IconFactory.IconData
      Returns:
      Whether it represents something deprecated.
    • isFinal

      public boolean isFinal()
      Description copied from interface: IconFactory.IconData
      Returns whether this icon represents a final class/method/etc.
      Specified by:
      isFinal in interface IconFactory.IconData
      Returns:
      Whether it represents something final.
    • isStatic

      public boolean isStatic()
      Description copied from interface: IconFactory.IconData
      Returns whether this icon represents a static class/method/etc.
      Specified by:
      isStatic in interface IconFactory.IconData
      Returns:
      Whether it represents something static.