Package org.fife.rsta.ac.java
Class FieldInfoData
- java.lang.Object
-
- org.fife.rsta.ac.java.FieldInfoData
-
- All Implemented Interfaces:
IconFactory.IconData,MemberCompletion.Data
class FieldInfoData extends java.lang.Object implements MemberCompletion.Data
Metadata about a field as read from a class file. This class is used by instances ofFieldCompletion.- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private FieldInfoinfoprivate SourceCompletionProviderprovider
-
Constructor Summary
Constructors Constructor Description FieldInfoData(FieldInfo info, SourceCompletionProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetEnclosingClassName(boolean fullyQualified)Returns the name of the enclosing class.java.lang.StringgetIcon()Returns the main icon to use when rendering this member's completion.java.lang.StringgetSignature()Returns the signature of this member.java.lang.StringgetSummary()Returns the summary description (should be HTML) for this member.private java.lang.StringgetSummaryFromSourceLoc(SourceLocation loc, ClassFile cf)Scours the source in a location (zip file, directory), looking for a particular class's source.java.lang.StringgetType()Returns the type of this member (the return type for methods).booleanisAbstract()Always returnsfalsesince fields cannot be abstract.booleanisConstructor()Always returnsfalse, fields cannot be constructors.booleanisDeprecated()Returns whether this icon represents a deprecated class/method/etc.booleanisFinal()Returns whether this icon represents a final class/method/etc.booleanisStatic()Returns whether this icon represents a static class/method/etc.
-
-
-
Field Detail
-
info
private FieldInfo info
-
provider
private SourceCompletionProvider provider
-
-
Constructor Detail
-
FieldInfoData
FieldInfoData(FieldInfo info, SourceCompletionProvider provider)
-
-
Method Detail
-
getEnclosingClassName
public java.lang.String getEnclosingClassName(boolean fullyQualified)
Description copied from interface:MemberCompletion.DataReturns the name of the enclosing class.- Specified by:
getEnclosingClassNamein interfaceMemberCompletion.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.IconDataReturns 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:
getIconin interfaceIconFactory.IconData- Returns:
- The icon to use.
-
getSignature
public java.lang.String getSignature()
Description copied from interface:MemberCompletion.DataReturns the signature of this member.- Specified by:
getSignaturein interfaceMemberCompletion.Data- Returns:
- The signature.
- See Also:
MemberCompletion.getSignature()
-
getSummary
public java.lang.String getSummary()
Description copied from interface:MemberCompletion.DataReturns the summary description (should be HTML) for this member.- Specified by:
getSummaryin interfaceMemberCompletion.Data- Returns:
- The summary description, or
nullif 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 field (if any) is returned.- Parameters:
loc- The zip file, jar file, or directory to look in.cf- TheClassFilerepresenting the class of this field.- Returns:
- The summary, or
nullif the field has no javadoc, the class's source was not found, or an IO error occurred.
-
getType
public java.lang.String getType()
Description copied from interface:MemberCompletion.DataReturns the type of this member (the return type for methods).- Specified by:
getTypein interfaceMemberCompletion.Data- Returns:
- The type of this member.
- See Also:
MemberCompletion.getType()
-
isAbstract
public boolean isAbstract()
Always returnsfalsesince fields cannot be abstract.- Specified by:
isAbstractin interfaceIconFactory.IconData- Returns:
falsealways.
-
isConstructor
public boolean isConstructor()
Always returnsfalse, fields cannot be constructors.- Specified by:
isConstructorin interfaceMemberCompletion.Data- Returns:
falsealways.
-
isDeprecated
public boolean isDeprecated()
Description copied from interface:IconFactory.IconDataReturns whether this icon represents a deprecated class/method/etc.- Specified by:
isDeprecatedin interfaceIconFactory.IconData- Returns:
- Whether it represents something deprecated.
-
isFinal
public boolean isFinal()
Description copied from interface:IconFactory.IconDataReturns whether this icon represents a final class/method/etc.- Specified by:
isFinalin interfaceIconFactory.IconData- Returns:
- Whether it represents something final.
-
isStatic
public boolean isStatic()
Description copied from interface:IconFactory.IconDataReturns whether this icon represents a static class/method/etc.- Specified by:
isStaticin interfaceIconFactory.IconData- Returns:
- Whether it represents something static.
-
-