|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.jdt.internal.core.JavaElement
org.eclipse.jdt.internal.core.SourceRefElement
org.eclipse.jdt.internal.core.Member
org.eclipse.jdt.internal.core.NamedMember
org.eclipse.jdt.internal.core.BinaryMember
org.eclipse.jdt.internal.core.ResolvedBinaryField
public class ResolvedBinaryField
Handle representing a binary field that is resolved. The uniqueKey contains the genericSignature of the resolved field. Use BindingKey to decode it.
Field Summary |
---|
Fields inherited from class org.eclipse.jdt.internal.core.SourceRefElement |
---|
occurrenceCount |
Fields inherited from class org.eclipse.jdt.internal.core.JavaElement |
---|
JEM_ANNOTATION, JEM_CLASSFILE, JEM_COMPILATIONUNIT, JEM_COUNT, JEM_ESCAPE, JEM_FIELD, JEM_IMPORTDECLARATION, JEM_INITIALIZER, JEM_JAVAPROJECT, JEM_LOCALVARIABLE, JEM_METHOD, JEM_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_TYPE, JEM_TYPE_PARAMETER |
Fields inherited from interface org.eclipse.jdt.core.IJavaElement |
---|
ANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER |
Constructor Summary | |
---|---|
ResolvedBinaryField(JavaElement parent,
java.lang.String name,
java.lang.String uniqueKey)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Returns true if this handle represents the same Java element as the given handle. |
IAnnotation[] |
getAnnotations()
Returns the annotations for this element. |
java.lang.String |
getAttachedJavadoc(org.eclipse.core.runtime.IProgressMonitor monitor)
Returns the Javadoc as an html source if this element has an attached javadoc, null otherwise. |
java.lang.Object |
getConstant()
Returns the constant value associated with this field or null if this field has none. |
int |
getElementType()
Returns this element's kind encoded as an integer. |
int |
getFlags()
Returns the modifier flags for this member. |
java.lang.String |
getKey()
Returns the binding key for this field. |
java.lang.String |
getKey(boolean forceOpen)
|
java.lang.String |
getTypeSignature()
Returns the type signature of this field. |
boolean |
isEnumConstant()
Returns whether this field represents an enum constant. |
boolean |
isResolved()
Returns whether this field represents a resolved field. |
JavaElement |
resolved(Binding binding)
|
JavaElement |
unresolved()
|
Methods inherited from class org.eclipse.jdt.internal.core.BinaryMember |
---|
copy, getCategories, getNameRange, getSourceRange, isBinary, isStructureKnown, move, rename, setContents |
Methods inherited from class org.eclipse.jdt.internal.core.NamedMember |
---|
getElementName, getFullyQualifiedName, getTypeQualifiedName, resolveType, resolveType |
Methods inherited from class org.eclipse.jdt.internal.core.Member |
---|
findMethods, getClassFile, getDeclaringType, getHandleFromMemento, getJavadocRange, getOuterMostLocalContext, getType, getTypeRoot, isReadOnly, readableName |
Methods inherited from class org.eclipse.jdt.internal.core.SourceRefElement |
---|
delete, findNode, getAnnotation, getCompilationUnit, getCorrespondingResource, getHandleUpdatingCountFromMemento, getOccurrenceCount, getOpenableParent, getPath, getSource, getUnderlyingResource, hasChildren, resource |
Methods inherited from class org.eclipse.jdt.internal.core.JavaElement |
---|
close, exists, getAncestor, getChildren, getChildrenOfType, getElementInfo, getElementInfo, getHandleFromMemento, getHandleIdentifier, getHandleMemento, getJavaModel, getJavaProject, getOpenable, getParent, getPrimaryElement, getPrimaryElement, getResource, getSchedulingRule, getSourceMapper, hashCode, isAncestorOf, newJavaModelException, newNotPresentException, toDebugString, toString, toStringInfo, toStringWithAncestors, toStringWithAncestors |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
---|
getAdapter |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jdt.core.IField |
---|
getElementName |
Methods inherited from interface org.eclipse.jdt.core.IMember |
---|
getCategories, getClassFile, getCompilationUnit, getDeclaringType, getJavadocRange, getNameRange, getOccurrenceCount, getType, getTypeRoot, isBinary |
Methods inherited from interface org.eclipse.jdt.core.IJavaElement |
---|
exists, getAncestor, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnown |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Methods inherited from interface org.eclipse.jdt.core.ISourceReference |
---|
exists, getSource, getSourceRange |
Methods inherited from interface org.eclipse.jdt.core.ISourceManipulation |
---|
copy, delete, move, rename |
Methods inherited from interface org.eclipse.jdt.core.IParent |
---|
getChildren, hasChildren |
Methods inherited from interface org.eclipse.jdt.core.IAnnotatable |
---|
getAnnotation |
Constructor Detail |
---|
public ResolvedBinaryField(JavaElement parent, java.lang.String name, java.lang.String uniqueKey)
Method Detail |
---|
public java.lang.String getKey()
IField
getKey
in interface IField
getKey
in class BinaryMember
IBinding.getKey()
,
BindingKey
public boolean isResolved()
IField
isResolved
in interface IField
public JavaElement unresolved()
unresolved
in class JavaElement
public boolean equals(java.lang.Object o)
JavaElement
If a subclass has other requirements for equality, this method must be overridden.
equals
in class SourceRefElement
Object.equals(java.lang.Object)
public IAnnotation[] getAnnotations() throws JavaModelException
IAnnotatable
getAnnotations
in interface IAnnotatable
getAnnotations
in class SourceRefElement
JavaModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resource.public java.lang.Object getConstant() throws JavaModelException
IField
null
if this field has none. The field needs to be static and final to have
a constant value.
Returns an instance of the wrapper type corresponding to the the type of the field.
field type | wrapper type |
---|---|
int | java.lang.Integer |
byte | java.lang.Byte |
boolean | java.lang.Boolean |
char | java.lang.Character |
double | java.lang.Double |
float | java.lang.Float |
long | java.lang.Long |
short | java.lang.Short |
java.lang.String | java.lang.String |
getConstant
in interface IField
null
if this field has none.
JavaModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resourcepublic int getFlags() throws JavaModelException
IMember
Flags
.
Note that only flags as indicated in the source are returned. Thus if an interface
defines a method void myMethod();
the flags don't include the
'public' flag.
getFlags
in interface IMember
getFlags
in class Member
JavaModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resource.IMember
public int getElementType()
IJavaElement
getElementType
in interface IJavaElement
IJavaElement
IJavaElement
public java.lang.String getKey(boolean forceOpen) throws JavaModelException
getKey
in class BinaryMember
JavaModelException
Binding.computeUniqueKey()
public java.lang.String getTypeSignature() throws JavaModelException
IField
The type signature may be either unresolved (for source types)
or resolved (for binary types), and either basic (for basic types)
or rich (for parameterized types). See Signature
for details.
getTypeSignature
in interface IField
JavaModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resourceSignature
public boolean isEnumConstant() throws JavaModelException
IField
isEnumConstant
in interface IField
JavaModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resourcepublic JavaElement resolved(Binding binding)
resolved
in class JavaElement
public java.lang.String getAttachedJavadoc(org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException
IJavaElement
Returns the Javadoc as an html source if this element has an attached javadoc, null otherwise.
This should be used only for binary elements. Source elements will always return null.
The encoding used to read the javadoc is the one defined by the content type of the file. If none is defined, then the project's encoding of this java element is used. If the project's encoding cannot be retrieved, then the platform encoding is used.
In case of the javadoc doesn't exist for this element, null is returned.
The html is extracted from the attached javadoc and provided as is. No transformation or validation is done.
getAttachedJavadoc
in interface IJavaElement
getAttachedJavadoc
in class JavaElement
monitor
- the given progress monitor
JavaModelException
- if:IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |