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.- 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 StaticTypedRefgetDeclaration()Gets the declaration of this symbol.JSDocInfogetJSDocInfo()Gets the JSDoc for this slot.java.lang.StringgetName()Gets the name of the slot.StaticTypedScopegetScope()JSTypegetType()Returns the type information, if any, for this slot.booleanisTypeInferred()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:StaticSlotGets the name of the slot.- Specified by:
getNamein interfaceStaticSlot
-
getType
public JSType getType()
Description copied from interface:StaticTypedSlotReturns the type information, if any, for this slot.- Specified by:
getTypein interfaceStaticTypedSlot- Returns:
- The type or
nullif no type is declared for it.
-
isTypeInferred
public boolean isTypeInferred()
Description copied from interface:StaticTypedSlotReturns whether the type has been inferred (as opposed to declared).- Specified by:
isTypeInferredin interfaceStaticTypedSlot
-
getDeclaration
public StaticTypedRef getDeclaration()
Description copied from interface:StaticTypedSlotGets the declaration of this symbol. May not exist.- Specified by:
getDeclarationin interfaceStaticSlot- Specified by:
getDeclarationin interfaceStaticTypedSlot
-
getJSDocInfo
public JSDocInfo getJSDocInfo()
Description copied from interface:StaticSlotGets the JSDoc for this slot.- Specified by:
getJSDocInfoin interfaceStaticSlot
-
getScope
public StaticTypedScope getScope()
- Specified by:
getScopein interfaceStaticSlot- Specified by:
getScopein interfaceStaticTypedSlot
-
-