Class TypeDeclarations
java.lang.Object
org.fife.rsta.ac.js.ast.type.ecma.TypeDeclarations
- Direct Known Subclasses:
TypeDeclarationsECMAv3
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimple class holder to hold the name of ECMA object and whether it can be instantiated -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate final HashSet<TypeDeclarations.JavaScriptObject> static final Stringstatic Stringprivate final HashMap<String, TypeDeclaration> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddECMAObject(String type, boolean canBeInstantiated) voidaddJavaScriptLookup(String apiName, String jsName) Add Javascript reverse lookupvoidaddTypeDeclaration(String name, TypeDeclaration dec) booleanAnswers the question whether an object can be instantiated (i.e.getClassName(String lookupType) private TypeDeclarationLookup the JavaScript name for a given namegetTypeDeclaration(String name) booleanReturns whether the qualified name is a built-in JavaScript typeprivate voidprotected voidprotected voidprotected abstract voidvoidremoveType(String name) Removes declaration type from type cache
-
Field Details
-
ECMA_DEFAULT_PACKAGE
- See Also:
-
ECMA_ARRAY
- See Also:
-
ECMA_BOOLEAN
- See Also:
-
ECMA_DATE
- See Also:
-
ECMA_ERROR
- See Also:
-
ECMA_FUNCTION
- See Also:
-
ECMA_MATH
- See Also:
-
ECMA_NUMBER
- See Also:
-
ECMA_OBJECT
- See Also:
-
ECMA_REGEXP
- See Also:
-
ECMA_STRING
- See Also:
-
ECMA_GLOBAL
- See Also:
-
ECMA_JSON
- See Also:
-
ECMA_NAMESPACE
- See Also:
-
ECMA_QNAME
- See Also:
-
ECMA_XML
- See Also:
-
ECMA_XMLLIST
- See Also:
-
FUNCTION_CALL
- See Also:
-
ANY
- See Also:
-
NULL_TYPE
-
types
-
javascriptReverseLookup
-
ecmaObjects
-
-
Constructor Details
-
TypeDeclarations
public TypeDeclarations()
-
-
Method Details
-
loadExtensions
private void loadExtensions() -
loadJavaScriptConstructors
protected void loadJavaScriptConstructors() -
addECMAObject
-
loadReverseLookup
protected void loadReverseLookup() -
loadTypes
protected abstract void loadTypes() -
addTypeDeclaration
-
getClassName
-
getAllClasses
-
getAllJavaScriptTypeDeclarations
-
addJavaScriptLookup
Add Javascript reverse lookup- Parameters:
apiName- Java API namejsName- Javascript name
-
removeType
Removes declaration type from type cache- Parameters:
name- name of type declaration
-
isJavaScriptType
Returns whether the qualified name is a built-in JavaScript type- Parameters:
td-- Returns:
-
getTypeDeclaration
- Parameters:
name-- Returns:
- Lookup type declaration from name. If the
TypeDeclarationcannot be found, then lookup using reserve lookup
-
getJSType
Lookup the JavaScript name for a given name- Parameters:
lookupName-- Returns:
- check whether the name is wrapped in [] then return ArrayTypeDeclaration otherwise lookup from JavaScript Name cache
- See Also:
-
getJavaScriptObjects
-
canECMAObjectBeInstantiated
Answers the question whether an object can be instantiated (i.e. has a constructor) Note, only tests ECMA objects- Parameters:
name- name of class to test
-