org.eclipse.wst.jsdt.core
Interface IClassFile
- All Superinterfaces:
- ICodeAssist, IFunctionContainer, IJavaScriptElement, ILookupScope, IOpenable, IParent, ISourceReference, ITypeRoot
public interface IClassFile
- extends ITypeRoot
Represents an entire non-editable JavaScript file.
non-editable JavaScript file elements need to be opened before they can be navigated.
If a file cannot be parsed, its structure remains unknown. Use
IJavaScriptElement.isStructureKnown
to determine whether this is the
case.
This interface is not intended to be implemented by clients.
Provisional API: This class/interface is part of an interim API that is still under development and expected to
change significantly before reaching stability. It is being made available at this early stage to solicit feedback
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
(repeatedly) as the API evolves.
Fields inherited from interface org.eclipse.wst.jsdt.core.IJavaScriptElement |
CLASS_FILE, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVASCRIPT_MODEL, JAVASCRIPT_PROJECT, JAVASCRIPT_UNIT, LOCAL_VARIABLE, METHOD, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE |
Methods inherited from interface org.eclipse.wst.jsdt.core.IJavaScriptElement |
exists, getAncestor, getAttachedJavadoc, getCommonSuperType, getCorrespondingResource, getDisplayName, getElementName, getElementType, getHandleIdentifier, getHostPath, getJavaScriptModel, getJavaScriptProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnown, isVirtual |
getBytes
byte[] getBytes()
throws JavaScriptModelException
- Returns the bytes contained in this file.
- Returns:
- the bytes contained in this file
- Throws:
JavaScriptModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resource
getType
IType getType()
- Returns the first type contained in this file.
This is a handle-only method. The type may or may not exist.
- Returns:
- the type contained in this file
getTypes
IType[] getTypes()
throws JavaScriptModelException
- Throws:
JavaScriptModelException
isClass
boolean isClass()
throws JavaScriptModelException
- Throws:
JavaScriptModelException
Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.