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

com.google.dart.compiler.backend.js.ast.AbstractNode Maven / Gradle / Ivy

There is a newer version: 2.1.0-Beta1
Show newest version
package com.google.dart.compiler.backend.js.ast;

import com.google.dart.compiler.backend.js.JsToStringGenerationVisitor;
import com.google.dart.compiler.backend.js.ast.metadata.HasMetadata;
import com.google.dart.compiler.util.TextOutputImpl;

abstract class AbstractNode extends HasMetadata implements JsNode {
    @Override
    public String toString() {
        TextOutputImpl out = new TextOutputImpl();
        new JsToStringGenerationVisitor(out).accept(this);
        return out.toString();
    }

    protected  T withMetadataFrom(T other) {
        this.copyMetadataFrom(other);
        //noinspection unchecked
        return (T) this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy