Top Description Inners Constructors Methods
org.python.indexer

public Class Outliner

extends Object
Class Inheritance
Imports
org.python.indexer.NBinding, .Util, org.python.indexer.types.NModuleType, .NType, .NUnionType, java.util.ArrayList, .List, .Set, .TreeSet

Generates a file outline from the index: a structure representing the variable and attribute definitions in a file.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Outliner.Branch

An outline entry with children.

public abstract static class
public static class
Outliner.Leaf

An entry with no children.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<Outliner.Entry>

Returns:

a list of entries constituting the file outline. Returns an empty list if the indexer hasn't indexed that path.
generate
(Indexer
index holding the file scope
idx
,
String
the file for which to build the outline
abspath
)

Create an outline for a file in the index.

public List<Outliner.Entry>

Returns:

a list of entries constituting the outline
generate
(Scope
the file scope
scope
,
String
the file for which we're building the outline
path
)

Create an outline for a symbol table.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Outlinerback to summary
public Outliner()

Method Detail

generateback to summary
public List<Outliner.Entry> generate(Indexer idx, String abspath) throws Exception

Create an outline for a file in the index.

Parameters
idx:Indexer

index holding the file scope

abspath:String

the file for which to build the outline

Returns:List<Outliner.Entry>

a list of entries constituting the file outline. Returns an empty list if the indexer hasn't indexed that path.

generateback to summary
public List<Outliner.Entry> generate(Scope scope, String path)

Create an outline for a symbol table.

Parameters
scope:Scope

the file scope

path:String

the file for which we're building the outline

Returns:List<Outliner.Entry>

a list of entries constituting the outline

org.python.indexer back to summary

public Class Outliner.Branch

extends Entry
Class Inheritance

An outline entry with children.

Field Summary

Modifier and TypeField and Description
private List<Outliner.Entry>
Inherited from org.python.indexer.Outliner.Entry:
kindoffsetqname

Constructor Summary

AccessConstructor and Description
public
public
Branch(String qname, int start, NBinding.Kind kind)

Method Summary

Modifier and TypeMethod and Description
public List<Outliner.Entry>
public boolean
public boolean
public boolean
public void
Inherited from org.python.indexer.Outliner.Entry:
asBranchasLeafgetKindgetNamegetOffsetgetQnamesetKindsetOffsetsetQnametoStringtoString

Field Detail

childrenback to summary
private List<Outliner.Entry> children

Constructor Detail

Branchback to summary
public Branch()
Branchback to summary
public Branch(String qname, int start, NBinding.Kind kind)

Method Detail

getChildrenback to summary
public List<Outliner.Entry> getChildren()

Implements abstract org.python.indexer.Outliner.Entry.getChildren.

Annotations
@Override
hasChildrenback to summary
public boolean hasChildren()

Implements abstract org.python.indexer.Outliner.Entry.hasChildren.

Annotations
@Override
isBranchback to summary
public boolean isBranch()

Implements abstract org.python.indexer.Outliner.Entry.isBranch.

Annotations
@Override
isLeafback to summary
public boolean isLeaf()

Implements abstract org.python.indexer.Outliner.Entry.isLeaf.

Annotations
@Override
setChildrenback to summary
public void setChildren(List<Outliner.Entry> children)

Implements abstract org.python.indexer.Outliner.Entry.setChildren.

Annotations
@Override
org.python.indexer back to summary

public abstract Class Outliner.Entry

extends Object
Class Inheritance
Known Direct Subclasses
org.python.indexer.Outliner.Branch, org.python.indexer.Outliner.Leaf

Field Summary

Modifier and TypeField and Description
protected NBinding.Kind
protected int
protected String

Constructor Summary

AccessConstructor and Description
public
public
Entry(String qname, int offset, NBinding.Kind kind)

Method Summary

Modifier and TypeMethod and Description
public Outliner.Branch
public Outliner.Leaf
public abstract List<Outliner.Entry>
public NBinding.Kind
public String
getName()

Returns the simple (unqualified) name of the identifier.

public int
getOffset()

Returns the file offset of the beginning of the identifier referenced by this outline entry.

public String
public abstract boolean
public abstract boolean
public abstract boolean
public abstract void
public void
public void
setOffset(int offset)

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
toString(StringBuilder sb, int depth)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

kindback to summary
protected NBinding.Kind kind
offsetback to summary
protected int offset
qnameback to summary
protected String qname

Constructor Detail

Entryback to summary
public Entry()
Entryback to summary
public Entry(String qname, int offset, NBinding.Kind kind)

Method Detail

asBranchback to summary
public Outliner.Branch asBranch()
asLeafback to summary
public Outliner.Leaf asLeaf()
getChildrenback to summary
public abstract List<Outliner.Entry> getChildren()
getKindback to summary
public NBinding.Kind getKind()
getNameback to summary
public String getName()

Returns the simple (unqualified) name of the identifier.

getOffsetback to summary
public int getOffset()

Returns the file offset of the beginning of the identifier referenced by this outline entry.

getQnameback to summary
public String getQname()
hasChildrenback to summary
public abstract boolean hasChildren()
isBranchback to summary
public abstract boolean isBranch()
isLeafback to summary
public abstract boolean isLeaf()
setChildrenback to summary
public abstract void setChildren(List<Outliner.Entry> children)
setKindback to summary
public void setKind(NBinding.Kind kind)
setOffsetback to summary
public void setOffset(int offset)
setQnameback to summary
public void setQname(String qname)
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
toStringback to summary
public void toString(StringBuilder sb, int depth)
org.python.indexer back to summary

public Class Outliner.Leaf

extends Entry
Class Inheritance

An entry with no children.

Field Summary

Inherited from org.python.indexer.Outliner.Entry:
kindoffsetqname

Constructor Summary

AccessConstructor and Description
public
Leaf()

public
Leaf(String qname, int start, NBinding.Kind kind)

Method Summary

Modifier and TypeMethod and Description
public List<Outliner.Entry>
public boolean
public boolean
public boolean
public void
Inherited from org.python.indexer.Outliner.Entry:
asBranchasLeafgetKindgetNamegetOffsetgetQnamesetKindsetOffsetsetQnametoStringtoString

Constructor Detail

Leafback to summary
public Leaf()
Leafback to summary
public Leaf(String qname, int start, NBinding.Kind kind)

Method Detail

getChildrenback to summary
public List<Outliner.Entry> getChildren()

Implements abstract org.python.indexer.Outliner.Entry.getChildren.

Annotations
@Override
hasChildrenback to summary
public boolean hasChildren()

Implements abstract org.python.indexer.Outliner.Entry.hasChildren.

Annotations
@Override
isBranchback to summary
public boolean isBranch()

Implements abstract org.python.indexer.Outliner.Entry.isBranch.

Annotations
@Override
isLeafback to summary
public boolean isLeaf()

Implements abstract org.python.indexer.Outliner.Entry.isLeaf.

Annotations
@Override
setChildrenback to summary
public void setChildren(List<Outliner.Entry> children)

Implements abstract org.python.indexer.Outliner.Entry.setChildren.

Annotations
@Override