Top Description Fields Constructors Methods
org.python.indexer.ast

public Class NameBinder

extends Object
Class Inheritance
Imports
org.python.indexer.Indexer, .NBinding, .Scope, org.python.indexer.types.NListType, .NTupleType, .NType, .NUnknownType, java.util.List

Handles binding names to scopes, including destructuring assignment.

Field Summary

Modifier and TypeField and Description
private static final NameBinder
private static final NameBinder
private static final NameBinder
private static final NameBinder
private static final NameBinder
private NBinding.Kind
private static final NameBinder
private static final NameBinder
private static final NameBinder
private static final NameBinder

Constructor Summary

AccessConstructor and Description
private
private

Method Summary

Modifier and TypeMethod and Description
public void
bind(Scope s, NNode target, NType rvalue)

public void
bind(Scope s, List<NNode> xs, NType rvalue)

public void
bindIter(Scope s, NNode target, NNode iter)

public NBinding
bindName(Scope s, NName name, NType rvalue)

private NBinding.Kind
public static NameBinder
make()

Factory method for creating instances.

public static NameBinder

Returns:

a NameBinder that will create bindings of kind, overriding the default choices.
make
(NBinding.Kind kind)

Factory method for creating instances.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ATTRIBUTE_BINDERback to summary
private static final NameBinder ATTRIBUTE_BINDER
CLASS_BINDERback to summary
private static final NameBinder CLASS_BINDER
CONSTRUCTOR_BINDERback to summary
private static final NameBinder CONSTRUCTOR_BINDER
DEFAULT_BINDERback to summary
private static final NameBinder DEFAULT_BINDER
FUNCTION_BINDERback to summary
private static final NameBinder FUNCTION_BINDER
kindback to summary
private NBinding.Kind kind
METHOD_BINDERback to summary
private static final NameBinder METHOD_BINDER
MODULE_BINDERback to summary
private static final NameBinder MODULE_BINDER
PARAMETER_BINDERback to summary
private static final NameBinder PARAMETER_BINDER
VARIABLE_BINDERback to summary
private static final NameBinder VARIABLE_BINDER

Constructor Detail

NameBinderback to summary
private NameBinder()
NameBinderback to summary
private NameBinder(NBinding.Kind kind)

Method Detail

bindback to summary
public void bind(Scope s, NNode target, NType rvalue) throws Exception
bindback to summary
public void bind(Scope s, List<NNode> xs, NType rvalue) throws Exception
bindIterback to summary
public void bindIter(Scope s, NNode target, NNode iter) throws Exception
bindNameback to summary
public NBinding bindName(Scope s, NName name, NType rvalue) throws Exception
kindOrback to summary
private NBinding.Kind kindOr(NBinding.Kind k)
makeback to summary
public static NameBinder make()

Factory method for creating instances.

makeback to summary
public static NameBinder make(NBinding.Kind kind)

Factory method for creating instances.

Returns:NameBinder

a NameBinder that will create bindings of kind, overriding the default choices.

reportUnpackMismatchback to summary
private void reportUnpackMismatch(List<NNode> xs, int vsize)