|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPlatformObject
org.aspectj.org.eclipse.jdt.internal.core.JavaElement
org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement
org.aspectj.org.eclipse.jdt.internal.core.Member
org.aspectj.org.eclipse.jdt.internal.core.NamedMember
org.aspectj.org.eclipse.jdt.internal.core.SourceField
public class SourceField
IField| Field Summary |
|---|
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.NamedMember |
|---|
name |
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement |
|---|
occurrenceCount |
| Fields inherited from class org.aspectj.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, NO_ELEMENTS, NO_INFO, parent |
| Fields inherited from interface org.aspectj.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 | |
|---|---|
protected |
SourceField(JavaElement parent,
java.lang.String name)
Constructs a handle to the field with the given name in the specified type. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Returns true if this handle represents the same Java element as the given handle. |
ASTNode |
findNode(CompilationUnit ast)
Returns the ASTNode that corresponds to this JavaElement
or null if there is no corresponding node. |
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. |
protected char |
getHandleMementoDelimiter()
Returns the char that marks the start of this handles
contribution to a memento. |
java.lang.String |
getKey()
Returns the binding key for this field only if the given field is resolved. |
IJavaElement |
getPrimaryElement(boolean checkOwner)
|
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)
|
protected void |
toStringInfo(int tab,
java.lang.StringBuffer buffer,
java.lang.Object info,
boolean showResolvedInfo)
Debugging purposes |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.NamedMember |
|---|
getElementName, getFullyQualifiedName, getFullyQualifiedParameterizedName, getKey, getKey, getKey, getPackageFragment, getTypeParameters, getTypeQualifiedName, resolveType, resolveType |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.Member |
|---|
areSimilarMethods, convertConstant, findMethods, getCategories, getClassFile, getDeclaringType, getFlags, getHandleFromMemento, getJavadocRange, getNameRange, getOuterMostLocalContext, getType, getTypeRoot, isBinary, isMainMethod, isReadOnly, readableName |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement |
|---|
closing, copy, createElementInfo, delete, generateInfos, getAnnotation, getAnnotations, getCompilationUnit, getCorrespondingResource, getHandleMemento, getHandleUpdatingCountFromMemento, getOccurrenceCount, getOpenableParent, getPath, getSource, getSourceRange, getUnderlyingResource, hasChildren, isStructureKnown, move, rename, resource, toStringName |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaElement |
|---|
close, escapeMementoName, exists, getAncestor, getAttachedJavadoc, getChildren, getChildrenOfType, getElementInfo, getElementInfo, getHandleFromMemento, getHandleIdentifier, getHandleMemento, getJavadocBaseLocation, getJavaModel, getJavaProject, getLibraryJavadocLocation, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, getSourceElementAt, getSourceMapper, getURLContents, hashCode, isAncestorOf, newDoesNotExistStatus, newJavaModelException, newNotPresentException, openWhenClosed, tabString, toDebugString, toString, toString, toStringAncestors, toStringChildren, toStringInfo, toStringWithAncestors, toStringWithAncestors, unresolved |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IField |
|---|
getElementName |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IMember |
|---|
getCategories, getClassFile, getCompilationUnit, getDeclaringType, getFlags, getJavadocRange, getOccurrenceCount, getType, getTypeRoot, isBinary |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IJavaElement |
|---|
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnown |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.ISourceReference |
|---|
exists, getNameRange, getSource, getSourceRange |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.ISourceManipulation |
|---|
copy, delete, move, rename |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IParent |
|---|
getChildren, hasChildren |
| Methods inherited from interface org.aspectj.org.eclipse.jdt.core.IAnnotatable |
|---|
getAnnotation, getAnnotations |
| Constructor Detail |
|---|
protected SourceField(JavaElement parent,
java.lang.String name)
| Method Detail |
|---|
public boolean equals(java.lang.Object o)
JavaElementIf a subclass has other requirements for equality, this method must be overridden.
equals in class SourceRefElementObject.equals(java.lang.Object)public ASTNode findNode(CompilationUnit ast)
SourceRefElementASTNode that corresponds to this JavaElement
or null if there is no corresponding node.
findNode in class SourceRefElement
public java.lang.Object getConstant()
throws JavaModelException
IFieldnull 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 IFieldnull if this field has none.
JavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceIFieldpublic int getElementType()
IJavaElement
getElementType in interface IJavaElementIJavaElementIJavaElementpublic java.lang.String getKey()
IFieldresolved.
A binding key is a key that uniquely identifies this field. It allows access to generic info
for parameterized fields.
If the given field is not resolved, the returned key is simply the java element's key.
getKey in interface IFieldIBinding.getKey(),
BindingKey,
IField.isResolved()protected char getHandleMementoDelimiter()
JavaElementchar that marks the start of this handles
contribution to a memento.
getHandleMementoDelimiter in class MemberJavaElement.getHandleMemento()public IJavaElement getPrimaryElement(boolean checkOwner)
getPrimaryElement in class JavaElement
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 IFieldJavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceIField
public boolean isEnumConstant()
throws JavaModelException
IField
isEnumConstant in interface IFieldJavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourcepublic boolean isResolved()
IField
isResolved in interface IFieldpublic JavaElement resolved(Binding binding)
resolved in class JavaElement
protected void toStringInfo(int tab,
java.lang.StringBuffer buffer,
java.lang.Object info,
boolean showResolvedInfo)
JavaElement
toStringInfo in class JavaElementshowResolvedInfo - TODO
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||