Package org.eclipse.jdt.core.search
Class TypeNameMatch
- java.lang.Object
-
- org.eclipse.jdt.core.search.TypeNameMatch
-
public abstract class TypeNameMatch extends java.lang.ObjectA match collected whilesearchingfor all type names methods using arequestor.The type of this match is available from
getType().- Since:
- 3.3
- See Also:
TypeNameMatchRequestor,SearchEngine.searchAllTypeNames(char[], int, char[], int, int, IJavaSearchScope, TypeNameMatchRequestor, int, org.eclipse.core.runtime.IProgressMonitor),SearchEngine.searchAllTypeNames(char[][], char[][], IJavaSearchScope, TypeNameMatchRequestor, int, org.eclipse.core.runtime.IProgressMonitor)- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description TypeNameMatch()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intgetAccessibility()Returns the accessibility of the type name matchjava.lang.StringgetFullyQualifiedName()Returns the matched type's fully qualified name using '.' character as separator (e.g. package name + '.' enclosing type names + '.' simple name).abstract intgetModifiers()Returns the modifiers of the matched type.IPackageFragmentRootgetPackageFragmentRoot()Returns the package fragment root of the stored type.java.lang.StringgetPackageName()Returns the package name of the stored type.java.lang.StringgetSimpleTypeName()Returns the name of the stored type.abstract ITypegetType()Returns a java model type handle.java.lang.StringgetTypeContainerName()Name of the type container using '.' character as separator (e.g. package name + '.' + enclosing type names).java.lang.StringgetTypeQualifiedName()Returns the matched type's type qualified name using '.' character as separator (e.g. enclosing type names + '.' + simple name).
-
-
-
Method Detail
-
getAccessibility
public abstract int getAccessibility()
Returns the accessibility of the type name match- Returns:
- the accessibility of the type name which may be
IAccessRule.K_ACCESSIBLE,IAccessRule.K_DISCOURAGEDorIAccessRule.K_NON_ACCESSIBLE. The default returned value isIAccessRule.K_ACCESSIBLE. - Since:
- 3.6
- See Also:
IAccessRule
-
getFullyQualifiedName
public java.lang.String getFullyQualifiedName()
Returns the matched type's fully qualified name using '.' character as separator (e.g. package name + '.' enclosing type names + '.' simple name).- Returns:
- Fully qualified type name of the type
- Throws:
java.lang.NullPointerException- if matched type isnull- See Also:
getType(),IType.getFullyQualifiedName(char)
-
getModifiers
public abstract int getModifiers()
Returns the modifiers of the matched type.This is a handle-only method as neither Java Model nor classpath initialization is done while calling this method.
- Returns:
- the type modifiers
-
getPackageFragmentRoot
public IPackageFragmentRoot getPackageFragmentRoot()
Returns the package fragment root of the stored type. Package fragment root cannot be null and does exist.- Returns:
- the existing java model package fragment root (i.e. cannot be
nulland will returntruetoexists()message). - Throws:
java.lang.NullPointerException- if matched type isnull- See Also:
getType(),IJavaElement.getAncestor(int)
-
getPackageName
public java.lang.String getPackageName()
Returns the package name of the stored type.- Returns:
- the package name
- Throws:
java.lang.NullPointerException- if matched type isnull- See Also:
getType(),IType.getPackageFragment()
-
getSimpleTypeName
public java.lang.String getSimpleTypeName()
Returns the name of the stored type.- Returns:
- the type name
- Throws:
java.lang.NullPointerException- if matched type isnull- See Also:
getType(),IJavaElement.getElementName()
-
getType
public abstract IType getType()
Returns a java model type handle. This handle may exist or not, but is not supposed to benull.This is a handle-only method as neither Java Model nor classpath initializations are done while calling this method.
- Returns:
- the non-null handle on matched java model type.
- See Also:
IType
-
getTypeContainerName
public java.lang.String getTypeContainerName()
Name of the type container using '.' character as separator (e.g. package name + '.' + enclosing type names).- Returns:
- name of the type container
- Throws:
java.lang.NullPointerException- if matched type isnull- See Also:
getType(),IMember.getDeclaringType()
-
getTypeQualifiedName
public java.lang.String getTypeQualifiedName()
Returns the matched type's type qualified name using '.' character as separator (e.g. enclosing type names + '.' + simple name).- Returns:
- fully qualified type name of the type
- Throws:
java.lang.NullPointerException- if matched type isnull- See Also:
getType(),IType.getTypeQualifiedName(char)
-
-