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

kendal.api.impl.builders.IdentifierBuilderImpl Maven / Gradle / Ivy

The newest version!
package kendal.api.impl.builders;

import com.sun.tools.javac.tree.JCTree.JCIdent;
import com.sun.tools.javac.tree.TreeMaker;
import com.sun.tools.javac.util.Name;

import kendal.api.AstUtils;
import kendal.api.builders.IdentifierBuilder;
import kendal.model.Node;
import kendal.model.TreeBuilder;

public class IdentifierBuilderImpl extends AbstractBuilder implements IdentifierBuilder {

    public IdentifierBuilderImpl(AstUtils astUtils, TreeMaker treeMaker) {
        super(astUtils, treeMaker);
    }

    @Override
    public Node build(String name) {
        return build(astUtils.nameFromString(name));
    }

    @Override
    public Node build(Name name) {
        JCIdent jcIdentifier = treeMaker.Ident(name);
        return TreeBuilder.buildNode(jcIdentifier);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy