APISonar


org.kie.api.io.ResourceType.JAVA

> org > kie > api > io > ResourceType > JAVA
org APIs kie APIs api APIs io APIs ResourceType APIs JAVA APIs

Example 1
private Resource buildResource(String resourceString, String targetPath) throws IOException {
        String content = readResourceToString(resourceString);
        Resource resource = kieServices.getResources().newReaderResource(new StringReader(content), "UTF-8");
        resource.setTargetPath(targetPath);
        if (resourceString.endsWith(".java")) {
            resource.setResourceType(ResourceType.JAVA);
        }
        return resource;
    }