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

org.qbicc.graph.literal.InitializerLiteral 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.InitializerElement;

/**
 *
 */
public final class InitializerLiteral extends ExecutableLiteral {
    InitializerLiteral(InitializerElement element) {
        super(element);
    }

    InitializerLiteral(final ExecutableElement element) {
        this((InitializerElement) element);
    }

    @Override
    public InitializerElement getExecutable() {
        return (InitializerElement) super.getExecutable();
    }

    @Override
    public boolean equals(ExecutableLiteral other) {
        return other instanceof InitializerLiteral il && equals(il);
    }

    public boolean equals(InitializerLiteral other) {
        return super.equals(other);
    }

    @Override
    public StringBuilder toReferenceString(StringBuilder b) {
        InitializerElement element = getExecutable();
        String niceClass = element.getEnclosingType().getInternalName().replace('/', '.');
        return b.append('@').append(niceClass).append('#').append("");
    }

    @Override
    public  R accept(LiteralVisitor visitor, T param) {
        return visitor.visit(param, this);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy