Class MethodInfoData

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getEnclosingClassName​(boolean fullyQualified)
      Returns the name of the enclosing class.
      java.lang.String getIcon()
      Returns the main icon to use when rendering this member's completion.
      private Method getMethodFromSourceLoc​(SourceLocation loc, ClassFile cf)
      Scours the source in a location (zip file, directory), looking for a particular class's source.
      java.lang.String getParameterName​(int index)
      Returns the name of the specified parameter to this method, or null if it cannot be determined.
      java.lang.String getSignature()
      Returns the signature of this member.
      java.lang.String getSummary()
      Returns the summary description (should be HTML) for this member.
      private java.lang.String getSummaryFromSourceLoc​(SourceLocation loc, ClassFile cf)
      Scours the source in a location (zip file, directory), looking for a particular class's source.
      java.lang.String getType()
      Returns the type of this member (the return type for methods).
      boolean isAbstract()
      Returns whether this icon represents an abstract class/method/etc.
      boolean isConstructor()
      Returns whether this member is a constructor.
      boolean isDeprecated()
      Returns whether this icon represents a deprecated class/method/etc.
      boolean isFinal()
      Returns whether this icon represents a final class/method/etc.
      boolean isStatic()
      Returns whether this icon represents a static class/method/etc.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • info

        private MethodInfo info
        The actual metadata.
      • paramNames

        private java.util.List<java.lang.String> paramNames
        Cached method parameter names.
    • Constructor Detail

      • MethodInfoData

        MethodInfoData​(MethodInfo info,
                       SourceCompletionProvider provider)
        Constructor.
        Parameters:
        info - The method info.
        provider - The parent completion provider.
    • Method Detail

      • getEnclosingClassName

        public java.lang.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 java.lang.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 java.lang.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.
      • getSummary

        public java.lang.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 java.lang.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.
      • 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.
      • 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.