Class MethodInfoData

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

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

  • Constructor Details

    • MethodInfoData

      MethodInfoData(MethodInfo info, SourceCompletionProvider provider)
      Constructor.
      Parameters:
      info - The method info.
      provider - The parent completion provider.
  • 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.
    • getMethodFromSourceLoc

      private Method getMethodFromSourceLoc(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 Method for this method (if any) is returned.
      Parameters:
      loc - The zip file, jar file, or directory to look in.
      cf - The ClassFile representing the class of this method.
      Returns:
      The method, or null if it cannot be found, or an IO error occurred.
    • getParameterName

      public String getParameterName(int index)
      Returns the name of the specified parameter to this method, or null if it cannot be determined.
      Parameters:
      index - The index of the parameter.
      Returns:
      The name of the parameter, or null.
    • 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 method (if any) is returned.
      Parameters:
      loc - The zip file, jar file, or directory to look in.
      cf - The ClassFile representing the class of this method.
      Returns:
      The summary, or null if the method 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()
      Description copied from interface: IconFactory.IconData
      Returns whether this icon represents an abstract class/method/etc.
      Specified by:
      isAbstract in interface IconFactory.IconData
      Returns:
      Whether it represents something abstract.
    • isConstructor

      public boolean isConstructor()
      Description copied from interface: MemberCompletion.Data
      Returns whether this member is a constructor.
      Specified by:
      isConstructor in interface MemberCompletion.Data
      Returns:
      Whether this member is a constructor.
    • 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.