Top Inners Fields Constructors Methods
org.python.indexer.types

public abstract Class NType

extends Object
Class Inheritance
Known Direct Subclasses
org.python.indexer.types.NUnionType, org.python.indexer.types.NUnknownType, org.python.indexer.types.NClassType, org.python.indexer.types.NDictType, org.python.indexer.types.NFuncType, org.python.indexer.types.NInstanceType, org.python.indexer.types.NListType, org.python.indexer.types.NModuleType, org.python.indexer.types.NTupleType
Imports
org.python.indexer.Builtins, .Indexer, .Scope, java.util.HashMap, .Map, java.util.regex.Matcher, .Pattern

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
NType.CyclicTypeRecorder

Internal class to support printing in the presence of type-graph cycles.

Field Summary

Modifier and TypeField and Description
private static Pattern
protected static final String
protected static final String
private Scope
protected static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public NClassType
public NDictType
public NFuncType
public NInstanceType
public NListType
public NModuleType
public NTupleType
public NUnionType
public NUnknownType
public NType
follow()

Returns NUnknownType#follow of this type.

public Scope
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isNative()

Returns true if this Python type is implemented in native code (i.e., C, Java, C# or some other host language.)

public boolean
public boolean
public boolean
public boolean
public boolean
protected abstract void
printKids(NType.CyclicTypeRecorder ctr, StringBuilder sb)

Internal method to support printing in the presence of type-graph cycles.

public void
setTable(Scope table)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

INSTANCE_TAGback to summary
private static Pattern INSTANCE_TAG
LIBRARY_URLback to summary
protected static final String LIBRARY_URL
REFERENCE_URLback to summary
protected static final String REFERENCE_URL
tableback to summary
private Scope table
TUTORIAL_URLback to summary
protected static final String TUTORIAL_URL

Constructor Detail

NTypeback to summary
public NType()

Method Detail

asClassTypeback to summary
public NClassType asClassType()
asDictTypeback to summary
public NDictType asDictType()
asFuncTypeback to summary
public NFuncType asFuncType()
asInstanceTypeback to summary
public NInstanceType asInstanceType()
asListTypeback to summary
public NListType asListType()
asModuleTypeback to summary
public NModuleType asModuleType()
asTupleTypeback to summary
public NTupleType asTupleType()
asUnionTypeback to summary
public NUnionType asUnionType()
asUnknownTypeback to summary
public NUnknownType asUnknownType()
followback to summary
public NType follow()

Returns NUnknownType#follow of this type.

getTableback to summary
public Scope getTable()
isClassTypeback to summary
public boolean isClassType()
isDictTypeback to summary
public boolean isDictType()
isFuncTypeback to summary
public boolean isFuncType()
isInstanceTypeback to summary
public boolean isInstanceType()
isListTypeback to summary
public boolean isListType()
isModuleTypeback to summary
public boolean isModuleType()
isNativeback to summary
public boolean isNative()

Returns true if this Python type is implemented in native code (i.e., C, Java, C# or some other host language.)

isNumTypeback to summary
public boolean isNumType()
isStrTypeback to summary
public boolean isStrType()
isTupleTypeback to summary
public boolean isTupleType()
isUnionTypeback to summary
public boolean isUnionType()
isUnknownTypeback to summary
public boolean isUnknownType()
printKidsback to summary
protected abstract void printKids(NType.CyclicTypeRecorder ctr, StringBuilder sb)

Internal method to support printing in the presence of type-graph cycles.

setTableback to summary
public void setTable(Scope table)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override

org.python.indexer.types back to summary

protected Class NType.CyclicTypeRecorder

extends Object
Class Inheritance

Internal class to support printing in the presence of type-graph cycles.

Field Summary

Modifier and TypeField and Description
pack-priv int
private Map<NType, Integer>

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the instance number: positive if the type was already recorded, or its negative if the type was just recorded and assigned a number.
fetch
(NType t)

Get the instance number for the specified type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
pack-priv int count
elementsback to summary
private Map<NType, Integer> elements

Constructor Detail

CyclicTypeRecorderback to summary
protected CyclicTypeRecorder()

Method Detail

fetchback to summary
public int fetch(NType t)

Get the instance number for the specified type.

Returns:int

the instance number: positive if the type was already recorded, or its negative if the type was just recorded and assigned a number.