org.qbicc.graph.literal.FunctionLiteral Maven / Gradle / Ivy
package org.qbicc.graph.literal;
import org.qbicc.type.definition.element.ExecutableElement;
import org.qbicc.type.definition.element.FunctionElement;
/**
*
*/
public final class FunctionLiteral extends InvokableLiteral {
FunctionLiteral(FunctionElement element) {
super(element);
}
FunctionLiteral(ExecutableElement element) {
this((FunctionElement) element);
}
@Override
public FunctionElement getExecutable() {
return (FunctionElement) super.getExecutable();
}
@Override
public boolean equals(InvokableLiteral other) {
return other instanceof FunctionLiteral cl && equals(cl);
}
public boolean equals(FunctionLiteral other) {
return super.equals(other);
}
@Override
public StringBuilder toReferenceString(StringBuilder b) {
FunctionElement element = getExecutable();
return b.append('@').append(element.getName());
}
@Override
public R accept(LiteralVisitor visitor, T param) {
return visitor.visit(param, this);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy