All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.qbicc.graph.literal.FunctionLiteral Maven / Gradle / Ivy

There is a newer version: 0.77.0
Show newest version
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