net.java.truelicense.maven.plugin.obfuscation.Node Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truelicense-maven-plugin Show documentation
Show all versions of truelicense-maven-plugin Show documentation
Provides a Maven plugin with goals for the obfuscation of constant
string values in Java class and test-class files (byte code).
/*
* Copyright (C) 2005-2013 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.java.truelicense.maven.plugin.obfuscation;
import de.schlichtherle.truezip.file.TFile;
import java.io.File;
/**
* @author Christian Schlichtherle
*/
final class Node {
private final String path;
private final File file;
Node(final String path, final File file) {
assert null != path;
assert null != file;
this.path = path;
this.file = file;
}
Node(Node node, String member) {
path = resolve(node.path(), member);
file = new TFile(node.file(), member);
}
private static String resolve(String path, String member) {
return path.isEmpty() ? member : path + File.separatorChar + member;
}
String path() { return path; }
File file() { return file; }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy