|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Untamed:
Method Summary | |
Astro |
build(AstroBuilder builder)
Enabled: Builds an Astro tree like this one, but the kind of Astro that's made by this builder. |
ConstList |
getArgs()
Enabled: @return :AstroArg[]; In most domains, AstroArg is the same as Astro, so this usually returns :Astro[]. |
Object |
getOptArgData()
Enabled: Equivalent to 'getArgs()[0].getOptData()'. |
Object |
getOptArgData(short tagCode)
Enabled: Like getOptArgData/0, but first requires getOptTagCode() == tagCode. |
String |
getOptArgString(short tagCode)
Enabled: A convenience equivalent to '((Twine)getOptArgData(tagCode)).bare()' |
Object |
getOptData()
Enabled: If this Astro represents a literal-data token, then this is the data, and getTag() must represent the canonical corresponding token-type for this kind of data in this schema. |
String |
getOptString()
Enabled: A convenience equivalent to '((Twine)getOptData()).bare()' |
short |
getOptTagCode()
Enabled: Equivalent to 'getTag().getOptTypeCode()' |
AstroTag |
getTag()
Enabled: Represents the token-type of the functor. |
Astro |
withArgs(ConstList args)
Enabled: Given that this Astro is a leaf (has no arguments), this returns an Astro just like it but with these arguments. |
Astro |
withoutArgs()
Enabled: An Astro just like this one, but without any arguments, which is therefore a leaf (and so may be a Token). |
Methods inherited from interface org.quasiliteral.astro.AstroArg |
getOptSpan |
Method Detail |
public Astro build(AstroBuilder builder)
Pattern-wise, the builder functions here as both as a factory, and sort-of as a visitor. It's not quite a visitor, in that it only sees the tree in bottom-up order.
public AstroTag getTag()
public short getOptTagCode()
public Object getOptData()
If the getTag() has no schema, then its getTagName() must be the corresponding token-type name.
public String getOptString()
public Object getOptArgData()
This exists as an optimization for composite Tokens, which act like 1-argument Astros, where the 1-argument is a data argument. This operation allows us to avoid creating a singleton argument list just to access this data.
getOptArgData/1 should normally be used instead
public Object getOptArgData(short tagCode)
public String getOptArgString(short tagCode)
public ConstList getArgs()
public Astro withoutArgs()
Even in the mutable AST domain, if this Astro has arguments, 'withoutArgs()' makes a copy rather than modifying this Astro in place.
public Astro withArgs(ConstList args)
Even in the mutable AST domain, if 'args' is non-empty, 'withArgs(..)' makes a copy rather than modifying this Astro in place.
If this Astro is not a leaf, this throws an exception even if 'args' is empty.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |