org.aspectj.org.eclipse.jdt.internal.core
Class SourceTypeElementInfo

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.JavaElementInfo
      extended by org.aspectj.org.eclipse.jdt.internal.core.AnnotatableInfo
          extended by org.aspectj.org.eclipse.jdt.internal.core.SourceTypeElementInfo
All Implemented Interfaces:
java.lang.Cloneable, IDependent, IGenericType, ISourceType

public class SourceTypeElementInfo
extends AnnotatableInfo
implements ISourceType

Element info for an IType element that originated from source.


Field Summary
protected  java.util.HashMap categories
           
protected  IJavaElement[] children
           
protected  int flags
          The modifiers associated with this member.
protected  IType handle
          Backpointer to my type handle - useful for translation from info to handle.
protected static SourceField[] NO_FIELDS
           
protected static ISourceImport[] NO_IMPORTS
           
protected static InitializerElementInfo[] NO_INITIALIZERS
           
protected static SourceMethod[] NO_METHODS
           
protected static SourceType[] NO_TYPES
           
protected  int sourceRangeEnd
           
protected  int sourceRangeStart
           
protected  char[] superclassName
          The name of the superclass for this type.
protected  char[][] superInterfaceNames
          The names of the interfaces this type implements or extends.
protected  ITypeParameter[] typeParameters
           
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.AnnotatableInfo
annotations, nameEnd, nameStart
 
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IDependent
JAR_FILE_ENTRY_SEPARATOR
 
Constructor Summary
SourceTypeElementInfo()
           
 
Method Summary
protected  void addCategories(IJavaElement element, char[][] elementCategories)
           
 java.util.HashMap getCategories()
           
 IJavaElement[] getChildren()
           
 int getDeclarationSourceEnd()
           
 int getDeclarationSourceStart()
           
 ISourceType getEnclosingType()
          Returns the ISourceType that is the enclosing type for this type, or null if this type is a top level type.
 SourceField[] getFieldHandles()
           
 ISourceField[] getFields()
          Answer the receiver's fields.
 char[] getFileName()
          Answer the file name which defines the type.
 IType getHandle()
          Returns the handle for this type info
 InitializerElementInfo[] getInitializers()
           
 char[][] getInterfaceNames()
          Answer the unresolved names of the receiver's interfaces or null if the array is empty.
 SourceType[] getMemberTypeHandles()
           
 ISourceType[] getMemberTypes()
          Answer the receiver's member types.
 SourceMethod[] getMethodHandles()
           
 ISourceMethod[] getMethods()
          Answer the receiver's methods.
 int getModifiers()
           
 char[] getName()
          Answer the simple source name of the receiver.
protected  ISourceRange getSourceRange()
           
 char[] getSuperclassName()
          Answer the unresolved name of the receiver's superclass or null if it does not have one.
 char[][][] getTypeParameterBounds()
          Answer the array of bound names of the receiver's type parameters.
 char[][] getTypeParameterNames()
          Answer the names of the receiver's type parameters.
 boolean isAnonymousMember()
           
 boolean isBinaryType()
          Answer whether the receiver contains the resolved binary form or the unresolved source form of the type.
protected  void setFlags(int flags)
           
protected  void setHandle(IType handle)
          Sets the handle for this type info
protected  void setSourceRangeEnd(int end)
           
protected  void setSourceRangeStart(int start)
           
protected  void setSuperclassName(char[] superclassName)
          Sets the (unqualified) name of this type's superclass
protected  void setSuperInterfaceNames(char[][] superInterfaceNames)
          Sets the (unqualified) names of the interfaces this type implements or extends
 java.lang.String toString()
           
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.AnnotatableInfo
getNameRange, getNameSourceEnd, getNameSourceStart, setNameSourceEnd, setNameSourceStart
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.JavaElementInfo
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.ISourceType
getDeclarationSourceEnd, getDeclarationSourceStart, getNameSourceEnd, getNameSourceStart
 
Methods inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IGenericType
getModifiers
 

Field Detail

NO_IMPORTS

protected static final ISourceImport[] NO_IMPORTS

NO_INITIALIZERS

protected static final InitializerElementInfo[] NO_INITIALIZERS

NO_FIELDS

protected static final SourceField[] NO_FIELDS

NO_METHODS

protected static final SourceMethod[] NO_METHODS

NO_TYPES

protected static final SourceType[] NO_TYPES

children

protected IJavaElement[] children

superclassName

protected char[] superclassName
The name of the superclass for this type. This name is fully qualified for binary types and is NOT fully qualified for source types.


superInterfaceNames

protected char[][] superInterfaceNames
The names of the interfaces this type implements or extends. These names are fully qualified in the case of a binary type, and are NOT fully qualified in the case of a source type


handle

protected IType handle
Backpointer to my type handle - useful for translation from info to handle.


typeParameters

protected ITypeParameter[] typeParameters

categories

protected java.util.HashMap categories

flags

protected int flags
The modifiers associated with this member.

See Also:
ClassFileConstants

sourceRangeStart

protected int sourceRangeStart

sourceRangeEnd

protected int sourceRangeEnd
Constructor Detail

SourceTypeElementInfo

public SourceTypeElementInfo()
Method Detail

addCategories

protected void addCategories(IJavaElement element,
                             char[][] elementCategories)

getCategories

public java.util.HashMap getCategories()

getChildren

public IJavaElement[] getChildren()
Overrides:
getChildren in class JavaElementInfo

getEnclosingType

public ISourceType getEnclosingType()
Returns the ISourceType that is the enclosing type for this type, or null if this type is a top level type.

Specified by:
getEnclosingType in interface ISourceType

getFields

public ISourceField[] getFields()
Description copied from interface: ISourceType
Answer the receiver's fields. NOTE: Multiple fields with the same name can exist in the result.

Specified by:
getFields in interface ISourceType
See Also:
ISourceType

getFieldHandles

public SourceField[] getFieldHandles()

getFileName

public char[] getFileName()
Description copied from interface: IDependent
Answer the file name which defines the type. The path part (optional) must be separated from the actual file proper name by a separator suitable for the type (java.io.File.separator for example), e.g. "c:\\source\\com\\p\\X.java" or "/com/p/Y.java". The path to the zip or jar file (optional) must be separated from the actual path part by JAR_FILE_ENTRY_SEPARATOR, e.g. "c:\\lib\\some.jar|/com/p/X.class" or "/lib/some.zip|/com/q/Y.class". The proper file name includes the suffix extension (e.g. ".java") e.g. "c:/org.aspectj.org.eclipse.jdt/internal/compileri/env/IDependent.java" Return null if no file defines the type.

Specified by:
getFileName in interface IDependent
See Also:
IDependent.getFileName()

getHandle

public IType getHandle()
Returns the handle for this type info


getInitializers

public InitializerElementInfo[] getInitializers()

getInterfaceNames

public char[][] getInterfaceNames()
Description copied from interface: ISourceType
Answer the unresolved names of the receiver's interfaces or null if the array is empty. A name is a simple name or a qualified, dot separated name. For example, Hashtable or java.util.Hashtable.

Specified by:
getInterfaceNames in interface ISourceType
See Also:
ISourceType

getMemberTypes

public ISourceType[] getMemberTypes()
Description copied from interface: ISourceType
Answer the receiver's member types.

Specified by:
getMemberTypes in interface ISourceType
See Also:
ISourceType

getMemberTypeHandles

public SourceType[] getMemberTypeHandles()

getMethods

public ISourceMethod[] getMethods()
Description copied from interface: ISourceType
Answer the receiver's methods. NOTE: Multiple methods with the same name & parameter types can exist in the result.

Specified by:
getMethods in interface ISourceType
See Also:
ISourceType

getMethodHandles

public SourceMethod[] getMethodHandles()

getName

public char[] getName()
Description copied from interface: ISourceType
Answer the simple source name of the receiver.

Specified by:
getName in interface ISourceType
See Also:
ISourceType.getName()

getSuperclassName

public char[] getSuperclassName()
Description copied from interface: ISourceType
Answer the unresolved name of the receiver's superclass or null if it does not have one. The name is a simple name or a qualified, dot separated name. For example, Hashtable or java.util.Hashtable.

Specified by:
getSuperclassName in interface ISourceType
See Also:
ISourceType

getTypeParameterBounds

public char[][][] getTypeParameterBounds()
Description copied from interface: ISourceType
Answer the array of bound names of the receiver's type parameters.

Specified by:
getTypeParameterBounds in interface ISourceType

getTypeParameterNames

public char[][] getTypeParameterNames()
Description copied from interface: ISourceType
Answer the names of the receiver's type parameters.

Specified by:
getTypeParameterNames in interface ISourceType

isBinaryType

public boolean isBinaryType()
Description copied from interface: IGenericType
Answer whether the receiver contains the resolved binary form or the unresolved source form of the type.

Specified by:
isBinaryType in interface IGenericType
See Also:
ISourceType

isAnonymousMember

public boolean isAnonymousMember()

setHandle

protected void setHandle(IType handle)
Sets the handle for this type info


setSuperclassName

protected void setSuperclassName(char[] superclassName)
Sets the (unqualified) name of this type's superclass


setSuperInterfaceNames

protected void setSuperInterfaceNames(char[][] superInterfaceNames)
Sets the (unqualified) names of the interfaces this type implements or extends


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getModifiers

public int getModifiers()
See Also:
IGenericType.getModifiers(), IGenericMethod.getModifiers(), IGenericField.getModifiers()

setFlags

protected void setFlags(int flags)

getDeclarationSourceEnd

public int getDeclarationSourceEnd()
See Also:
ISourceType.getDeclarationSourceEnd(), ISourceMethod.getDeclarationSourceEnd(), ISourceField.getDeclarationSourceEnd()

getDeclarationSourceStart

public int getDeclarationSourceStart()
See Also:
ISourceType.getDeclarationSourceStart(), ISourceMethod.getDeclarationSourceStart(), ISourceField.getDeclarationSourceStart()

getSourceRange

protected ISourceRange getSourceRange()

setSourceRangeEnd

protected void setSourceRangeEnd(int end)

setSourceRangeStart

protected void setSourceRangeStart(int start)