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

com.hframework.common.dyncompile.Source Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.hframework.common.dyncompile;

import javax.tools.SimpleJavaFileObject;
import java.net.URI;

/**
 * Created by zhangquanhong on 2017/3/14.
 */
public class Source extends SimpleJavaFileObject {
    private final String content;
    public Source(String name, Kind kind, String content) {
        super(URI.create("dynamic:///" + name.replace('.', '/') + kind.extension), kind);
        this.content = content;
    }
    @Override
    public CharSequence getCharContent(boolean ignore) {
        return this.content;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy