public static class DefaultCodeBuilder.BaseMethod extends DefaultCodeBuilder.BaseCode implements Code.Method
Code.Callable, Code.Constant, Code.EmptyFormatter, Code.Identifier, Code.Method
BINARY_OPERATOR, FUNCTION, UNARY_OPERATOR
CALLABLE, CODES, CONSTANT, EMPTY_FORMATTER, IDENTIFIER, METHOD, UNDEFINED
Constructor and Description |
---|
BaseMethod(Code instance,
java.lang.String methodname,
Codes args) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor,
java.util.function.Predicate<FilteredVisitable> exclude)
Provides each value of this container to the provided
Visitor . |
java.lang.Object |
call(Interpreter interpreter,
java.lang.Object[] args) |
Code |
clone()
Creates a copy of the object.
|
int |
code() |
Function |
function() |
Function |
function(Function function) |
Code |
instance() |
java.lang.String |
methodname() |
java.lang.String |
name() |
Codes |
parameters() |
void |
replace(Code target,
Code replacement) |
java.lang.String |
toString() |
java.lang.String |
toString(Formatter<Code> formatter) |
ExpressionBuilder.Value |
toValue(ExpressionBuilder builder) |
int |
type() |
accept, link, link, link, toValue
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
name, parameters
isFunction, isIdentifier, link, link, link, toValue
accept
cloneQuietly, cloneQuietly
public void accept(Visitor visitor, java.util.function.Predicate<FilteredVisitable> exclude) throws BaseException
FilteredVisitable
Visitor
.accept
in interface FilteredVisitable
accept
in class DefaultCodeBuilder.BaseCode
visitor
- the visitor to apply to each value.BaseException
- if there is an error while performing the visitpublic Code clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in interface Code
clone
in class DefaultCodeBuilder.BaseCode
java.lang.CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.
public int code()
code
in interface Code
code
in class DefaultCodeBuilder.BaseCode
public void replace(Code target, Code replacement)
replace
in interface Code
replace
in class DefaultCodeBuilder.BaseCode
public java.lang.String methodname()
methodname
in interface Code.Method
public Code instance()
instance
in interface Code.Method
public Codes parameters()
parameters
in interface Code.Callable
parameters
in interface Code.Method
public java.lang.Object call(Interpreter interpreter, java.lang.Object[] args) throws java.lang.Exception
call
in interface Code.Callable
call
in interface Code.Method
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
public ExpressionBuilder.Value toValue(ExpressionBuilder builder)
toValue
in interface Code
toValue
in class DefaultCodeBuilder.BaseCode
public java.lang.String name()
name
in interface Code.Callable
public Function function()
function
in interface Code.Callable
public Function function(Function function)
function
in interface Code.Callable
public int type()
type
in interface Code.Callable