S - superscript / export typeT - returned typepublic final class ShareCall<S,T> extends AbstractPersistedTree<S,T>
| Constructor and Description |
|---|
ShareCall(Metadata metadata,
java.util.Optional<Reference> localName,
java.util.Optional<Reference> fieldName,
ProtelisAST<S> init,
ProtelisAST<S> body,
java.util.Optional<ProtelisAST<T>> yield)
Convenience constructor with
Optional. |
ShareCall(Metadata metadata,
com.google.common.base.Optional<Reference> localName,
com.google.common.base.Optional<Reference> fieldName,
ProtelisAST<S> init,
ProtelisAST<S> body,
com.google.common.base.Optional<ProtelisAST<T>> yield) |
| Modifier and Type | Method and Description |
|---|---|
T |
evaluate(ExecutionContext context)
Evaluates this AST node.
|
Bytecode |
getBytecode() |
java.lang.String |
getName() |
com.google.common.base.Optional<AbstractProtelisAST<T>> |
getYieldExpression() |
java.lang.String |
toString() |
loadState, saveStatebranchesToString, branchesToString, eval, forEach, forEachWithIndex, getBranch, getBranches, getBranchesNumber, getMetadata, isNullable, stringForpublic ShareCall(@Nonnull
Metadata metadata,
@Nonnull
java.util.Optional<Reference> localName,
@Nonnull
java.util.Optional<Reference> fieldName,
@Nonnull
ProtelisAST<S> init,
@Nonnull
ProtelisAST<S> body,
@Nonnull
java.util.Optional<ProtelisAST<T>> yield)
Optional.metadata - A Metadata object containing information about the code that generated this AST node.localName - variable namefieldName - name of the field versioninit - initial valuebody - bodyyield - bodypublic ShareCall(@Nonnull
Metadata metadata,
@Nonnull
com.google.common.base.Optional<Reference> localName,
@Nonnull
com.google.common.base.Optional<Reference> fieldName,
@Nonnull
ProtelisAST<S> init,
@Nonnull
ProtelisAST<S> body,
@Nonnull
com.google.common.base.Optional<ProtelisAST<T>> yield)
metadata - A Metadata object containing information about the code that generated this AST node.localName - variable namefieldName - name of the field versioninit - initial valuebody - bodyyield - bodypublic T evaluate(ExecutionContext context)
AbstractProtelisASTAbstractProtelisAST takes care of storing the necessary metadata.evaluate in class AbstractProtelisAST<T>context - the execution contextpublic java.lang.String getName()
AbstractProtelisASTgetName in interface ProtelisAST<T>getName in class AbstractProtelisAST<T>public com.google.common.base.Optional<AbstractProtelisAST<T>> getYieldExpression()
Optional containing the ProtelisAST representing the yield expression,
or an Optional.absent() otherwise.public java.lang.String toString()
AbstractPersistedTreetoString in class AbstractPersistedTree<S,T>