public abstract static class WyilFile.Block extends Object implements wybs.lang.SyntacticElement
A block is an chunk of information within a WyIL file. For example, it might be a declaration for a type, constant, function or method. However, other kinds of block are possible, such as for storing documentation, debug information, etc.
A block may have zero or more "attributes" associated with it. Attributes provide meta-information about the block which, although not strictly necessary for execution, are typically helpful. Such information includes additional type information, variable naming information, etc.
| Constructor and Description |
|---|
Block(WyilFile parent,
wybs.lang.Attribute[] attributes) |
Block(WyilFile parent,
Collection<wybs.lang.Attribute> attributes) |
| Modifier and Type | Method and Description |
|---|---|
<T extends wybs.lang.Attribute> |
attribute(Class<T> type) |
List<wybs.lang.Attribute> |
attributes() |
WyilFile |
parent()
Get the WyIL file enclosing this block
|
public Block(WyilFile parent, Collection<wybs.lang.Attribute> attributes)
public Block(WyilFile parent, wybs.lang.Attribute[] attributes)
public WyilFile parent()
public List<wybs.lang.Attribute> attributes()
attributes in interface wybs.lang.SyntacticElementpublic <T extends wybs.lang.Attribute> T attribute(Class<T> type)
attribute in interface wybs.lang.SyntacticElementCopyright © 2017. All rights reserved.