Class SimpleSlot
- java.lang.Object
-
- com.google.javascript.rhino.jstype.SimpleSlot
-
- All Implemented Interfaces:
StaticTypedSlot
,StaticSlot
,java.io.Serializable
- Direct Known Subclasses:
SymbolTable.Symbol
public class SimpleSlot extends java.lang.Object implements StaticTypedSlot, java.io.Serializable
The minimum implementation ofStaticTypedSlot
.- Author:
- [email protected] (Nick Santos)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleSlot(java.lang.String name, JSType type, boolean inferred)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StaticTypedRef
getDeclaration()
Gets the declaration of this symbol.JSDocInfo
getJSDocInfo()
Gets the JSDoc for this slot.java.lang.String
getName()
Gets the name of the slot.StaticTypedScope
getScope()
JSType
getType()
Returns the type information, if any, for this slot.boolean
isTypeInferred()
Returns whether the type has been inferred (as opposed to declared).
-
-
-
Constructor Detail
-
SimpleSlot
public SimpleSlot(java.lang.String name, JSType type, boolean inferred)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:StaticSlot
Gets the name of the slot.- Specified by:
getName
in interfaceStaticSlot
-
getType
public JSType getType()
Description copied from interface:StaticTypedSlot
Returns the type information, if any, for this slot.- Specified by:
getType
in interfaceStaticTypedSlot
- Returns:
- The type or
null
if no type is declared for it.
-
isTypeInferred
public boolean isTypeInferred()
Description copied from interface:StaticTypedSlot
Returns whether the type has been inferred (as opposed to declared).- Specified by:
isTypeInferred
in interfaceStaticTypedSlot
-
getDeclaration
public StaticTypedRef getDeclaration()
Description copied from interface:StaticTypedSlot
Gets the declaration of this symbol. May not exist.- Specified by:
getDeclaration
in interfaceStaticSlot
- Specified by:
getDeclaration
in interfaceStaticTypedSlot
-
getJSDocInfo
public JSDocInfo getJSDocInfo()
Description copied from interface:StaticSlot
Gets the JSDoc for this slot.- Specified by:
getJSDocInfo
in interfaceStaticSlot
-
getScope
public StaticTypedScope getScope()
- Specified by:
getScope
in interfaceStaticSlot
- Specified by:
getScope
in interfaceStaticTypedSlot
-
-