static class GlobalNamespace.Name extends java.lang.Object implements StaticTypedSlot<TypeI>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
GlobalNamespace.Name.Type |
Modifier and Type | Field and Description |
---|---|
(package private) int |
aliasingGets |
private java.lang.String |
baseName |
(package private) int |
callGets |
private GlobalNamespace.Ref |
declaration
The first global assignment to a name.
|
private boolean |
declaredType |
(package private) int |
deleteProps |
(package private) JSDocInfo |
docInfo |
(package private) int |
globalSets |
(package private) boolean |
inExterns |
private boolean |
isDeclared |
(package private) int |
localSets |
(package private) int |
localSetsWithNoCollapse |
(package private) GlobalNamespace.Name |
parent |
(package private) java.util.List<GlobalNamespace.Name> |
props |
private java.util.List<GlobalNamespace.Ref> |
refs
All references to a name.
|
(package private) int |
totalGets |
(package private) GlobalNamespace.Name.Type |
type |
Constructor and Description |
---|
Name(java.lang.String name,
GlobalNamespace.Name parent,
boolean inExterns) |
Modifier and Type | Method and Description |
---|---|
(package private) GlobalNamespace.Name |
addProperty(java.lang.String name,
boolean inExterns) |
(package private) void |
addRef(GlobalNamespace.Ref ref) |
(package private) void |
addRefInternal(GlobalNamespace.Ref ref) |
(package private) boolean |
canCollapse() |
(package private) boolean |
canCollapseUnannotatedChildNames() |
(package private) boolean |
canEliminate() |
(package private) java.lang.String |
getBaseName() |
GlobalNamespace.Ref |
getDeclaration()
Gets the declaration of this symbol.
|
private static JSDocInfo |
getDocInfoForDeclaration(GlobalNamespace.Ref ref)
Tries to get the doc info for a given declaration ref.
|
(package private) java.lang.String |
getFullName() |
JSDocInfo |
getJSDocInfo()
Gets the JSDoc for this slot.
|
java.lang.String |
getName()
Gets the name of the slot.
|
(package private) java.util.List<GlobalNamespace.Ref> |
getRefs() |
TypeI |
getType()
Returns the type information, if any, for this slot.
|
(package private) boolean |
isCollapsingExplicitlyDenied() |
(package private) boolean |
isConstructor() |
(package private) boolean |
isDeclaredType() |
(package private) boolean |
isGetOrSetDefinition() |
(package private) boolean |
isInlinableGlobalAlias() |
(package private) boolean |
isNamespaceObjectLit()
Determines whether this name is a prefix of at least one class or enum
name.
|
(package private) boolean |
isSimpleName()
Determines whether this is a simple name (as opposed to a qualified
name).
|
(package private) boolean |
isSimpleStubDeclaration() |
boolean |
isTypeInferred()
Returns whether the type has been inferred (as opposed to declared).
|
(package private) boolean |
needsToBeStubbed() |
(package private) void |
removeRef(GlobalNamespace.Ref ref) |
(package private) void |
setDeclaredType() |
(package private) boolean |
shouldKeepKeys()
Whether this is an object literal that needs to keep its keys.
|
java.lang.String |
toString() |
private final java.lang.String baseName
final GlobalNamespace.Name parent
java.util.List<GlobalNamespace.Name> props
private GlobalNamespace.Ref declaration
private java.util.List<GlobalNamespace.Ref> refs
declaration
.GlobalNamespace.Name.Type type
private boolean declaredType
private boolean isDeclared
int globalSets
int localSets
int localSetsWithNoCollapse
int aliasingGets
int totalGets
int callGets
int deleteProps
final boolean inExterns
JSDocInfo docInfo
Name(java.lang.String name, GlobalNamespace.Name parent, boolean inExterns)
GlobalNamespace.Name addProperty(java.lang.String name, boolean inExterns)
java.lang.String getBaseName()
public java.lang.String getName()
StaticSlot
getName
in interface StaticSlot
java.lang.String getFullName()
public GlobalNamespace.Ref getDeclaration()
StaticTypedSlot
getDeclaration
in interface StaticTypedSlot<TypeI>
getDeclaration
in interface StaticSlot
public boolean isTypeInferred()
StaticTypedSlot
isTypeInferred
in interface StaticTypedSlot<TypeI>
public TypeI getType()
StaticTypedSlot
getType
in interface StaticTypedSlot<TypeI>
null
if no type is declared for it.void addRef(GlobalNamespace.Ref ref)
void removeRef(GlobalNamespace.Ref ref)
java.util.List<GlobalNamespace.Ref> getRefs()
void addRefInternal(GlobalNamespace.Ref ref)
boolean canEliminate()
boolean isSimpleStubDeclaration()
boolean isCollapsingExplicitlyDenied()
boolean isInlinableGlobalAlias()
boolean canCollapse()
boolean isGetOrSetDefinition()
boolean canCollapseUnannotatedChildNames()
boolean shouldKeepKeys()
boolean needsToBeStubbed()
void setDeclaredType()
boolean isDeclaredType()
boolean isConstructor()
boolean isNamespaceObjectLit()
boolean isSimpleName()
public java.lang.String toString()
toString
in class java.lang.Object
public JSDocInfo getJSDocInfo()
StaticSlot
getJSDocInfo
in interface StaticSlot
private static JSDocInfo getDocInfoForDeclaration(GlobalNamespace.Ref ref)