Top Fields Constructors Methods
org.python.antlr.ast

public Class comprehension

extends PythonTree
Class Inheritance
Known Direct Subclasses
org.python.antlr.ast.comprehensionDerived
Annotations
@ExposedType
name:_ast.comprehension
base:AST
Imports
org.antlr.runtime.Token, org.python.antlr.AST, .PythonTree, org.python.antlr.adapter.AstAdapters, org.python.antlr.base.expr, org.python.core.ArgParser, .AstList, .Py, .PyObject, .PyString, .PyStringMap, .PyType, .Visitproc, org.python.expose.ExposedGet, .ExposedMethod, .ExposedNew, .ExposedSet, .ExposedType, java.util.ArrayList

Field Summary

Modifier and TypeField and Description
public PyObject
private static final PyString[]
private static final PyString[]
private List<expr>
private expr
private expr
public static final PyType
Inherited from org.python.antlr.PythonTree:
childrenfrom_future_checked

Constructor Summary

AccessConstructor and Description
public
public
public
public
comprehension(Token token, expr target, expr iter, List<expr> ifs)

public
comprehension(Integer ttype, Token token, expr target, expr iter, List<expr> ifs)

public
comprehension(PythonTree tree, expr target, expr iter, List<expr> ifs)

Method Summary

Modifier and TypeMethod and Description
public <R> R
public void
private void
public PyObject
fastGetDict()

Overrides org.python.core.PyObject.fastGetDict.

xxx implements where meaningful

public PyString[]
public PyString[]
public PyObject
getDict()

Overrides org.python.core.PyObject.getDict.

xxx implements where meaningful

public PyObject
public List<expr>
public expr
public expr
public PyObject
public PyObject
public boolean
public void
public void
public void
public String
toString()

Overrides org.python.antlr.PythonTree.toString.

Returns a string representation of the object.

public String
public void
public int
traverse(Visitproc visit, Object arg)

Overrides org.python.antlr.PythonTree.traverse.

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

Inherited from org.python.antlr.PythonTree:
addChildaddChildrencreateChildrenListdeleteChilddottedNameListToStringdumpThisdumpThisdumpThisdupNodefreshenParentAndChildIndexesfreshenParentAndChildIndexesgetAntlrTypegetCharPositionInLinegetCharStartIndexgetCharStopIndexgetChildgetChildCountgetChildIndexgetChildrengetCol_offsetgetFirstChildWithTypegetLinegetLinenogetNodegetParentgetTextgetTokengetTokenStartIndexgetTokenStopIndexisNilreplaceChildrensetCharStartIndexsetCharStopIndexsetChildsetChildIndexsetParentsetTokenStartIndexsetTokenStopIndex

Field Detail

__dict__back to summary
public PyObject __dict__
attributesback to summary
private static final PyString[] attributes

Hides org.python.core.PyObject.attributes.

fieldsback to summary
private static final PyString[] fields
ifsback to summary
private List<expr> ifs
iterback to summary
private expr iter
targetback to summary
private expr target
TYPEback to summary
public static final PyType TYPE

Hides org.python.antlr.AST.TYPE.

Constructor Detail

comprehensionback to summary
public comprehension(PyType subType)
comprehensionback to summary
public comprehension()
comprehensionback to summary
public comprehension(PyObject target, PyObject iter, PyObject ifs)
comprehensionback to summary
public comprehension(Token token, expr target, expr iter, List<expr> ifs)
comprehensionback to summary
public comprehension(Integer ttype, Token token, expr target, expr iter, List<expr> ifs)
comprehensionback to summary
public comprehension(PythonTree tree, expr target, expr iter, List<expr> ifs)

Method Detail

acceptback to summary
public <R> R accept(VisitorIF<R> visitor) throws Exception

Overrides org.python.antlr.PythonTree.accept.

comprehension___init__back to summary
public void comprehension___init__(PyObject[] args, String[] keywords)
Annotations
@ExposedNew
@ExposedMethod
ensureDictback to summary
private void ensureDict()
fastGetDictback to summary
public PyObject fastGetDict()

Overrides org.python.core.PyObject.fastGetDict.

Doc from org.python.core.PyObject.fastGetDict.

xxx implements where meaningful

Returns:PyObject

internal object per instance dict or null

Annotations
@Override
get_attributesback to summary
public PyString[] get_attributes()
Annotations
@ExposedGet
name:_attributes
get_fieldsback to summary
public PyString[] get_fields()
Annotations
@ExposedGet
name:_fields
getDictback to summary
public PyObject getDict()

Overrides org.python.core.PyObject.getDict.

Doc from org.python.core.PyObject.getDict.

xxx implements where meaningful

Returns:PyObject

internal object __dict__ or null

Annotations
@ExposedGet
name:__dict__
getIfsback to summary
public PyObject getIfs()
Annotations
@ExposedGet
name:ifs
getInternalIfsback to summary
public List<expr> getInternalIfs()
getInternalIterback to summary
public expr getInternalIter()
getInternalTargetback to summary
public expr getInternalTarget()
getIterback to summary
public PyObject getIter()
Annotations
@ExposedGet
name:iter
getTargetback to summary
public PyObject getTarget()
Annotations
@ExposedGet
name:target
refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

Overrides org.python.antlr.PythonTree.refersDirectlyTo.

Implements org.python.core.Traverseproc.refersDirectlyTo.

Doc from org.python.core.Traverseproc.refersDirectlyTo.

Optional operation. Should only be implemented if it is more efficient than calling traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.

Annotations
@Override
setIfsback to summary
public void setIfs(PyObject ifs)
Annotations
@ExposedSet
name:ifs
setIterback to summary
public void setIter(PyObject iter)
Annotations
@ExposedSet
name:iter
setTargetback to summary
public void setTarget(PyObject target)
Annotations
@ExposedSet
name:target
toStringback to summary
public String toString()

Overrides org.python.antlr.PythonTree.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
@ExposedGet
name:repr
toStringTreeback to summary
public String toStringTree()

Overrides org.python.antlr.PythonTree.toStringTree.

traverseback to summary
public void traverse(VisitorIF<?> visitor) throws Exception

Overrides org.python.antlr.PythonTree.traverse.

traverseback to summary
public int traverse(Visitproc visit, Object arg)

Overrides org.python.antlr.PythonTree.traverse.

Implements org.python.core.Traverseproc.traverse.

Doc from org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects. Like in CPython, arg must be passed unmodified to visit as its second parameter. If Visitproc#visit(PyObject, Object) returns nonzero, this return value must be returned immediately by traverse. Visitproc#visit(PyObject, Object) must not be called with a null PyObject-argument.

Annotations
@Override