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

org.qbicc.graph.BlockEntry Maven / Gradle / Ivy

There is a newer version: 0.77.0
Show newest version
package org.qbicc.graph;

import org.qbicc.type.definition.element.ExecutableElement;

/**
 * A node representing block entry.  Block entry nodes have no dependencies.
 */
public final class BlockEntry extends AbstractNode implements PinnedNode, Action {
    private final BlockLabel blockLabel;

    BlockEntry(final Node callSite, final ExecutableElement element, final BlockLabel blockLabel) {
        super(callSite, element, 0, -1);
        this.blockLabel = blockLabel;
    }

    public BlockLabel getPinnedBlockLabel() {
        return blockLabel;
    }

    public  R accept(final ActionVisitor visitor, final T param) {
        return visitor.visit(param, this);
    }

    int calcHashCode() {
        return blockLabel.hashCode();
    }

    @Override
    String getNodeName() {
        return "BlockEntry";
    }

    public boolean equals(final Object other) {
        return other instanceof BlockEntry && equals((BlockEntry) other);
    }

    public boolean equals(final BlockEntry other) {
        return this == other || other != null && blockLabel.equals(other.blockLabel);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy