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

net.java.truelicense.maven.plugin.obfuscation.Node Maven / Gradle / Ivy

Go to download

Provides a Maven plugin with goals for the obfuscation of constant string values in Java class and test-class files (byte code).

There is a newer version: 2.6.6
Show newest version
/*
 * 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