public static FileKey newName(String packageName, String rawName, String ext) { return new FileKey(packageName, rawName, ext); }
public static FileKey newName(String packageName, String rawName, String ext) { return new FileKey(packageName, rawName, ext); }
public FileKey as(JavaFileObject.Kind kind) { return new FileKey(packageFQN, rawName, kind.extension.substring(1)); }
public FileKey as(JavaFileObject.Kind kind) { return new FileKey(packageFQN, rawName, kind.extension.substring(1)); }
public static FileKey newJavaName(String className, JavaFileObject.Kind kind) { if (kind == JavaFileObject.Kind.SOURCE || kind == JavaFileObject.Kind.CLASS) { int pos = className.lastIndexOf('.'); if (pos == -1) { return new FileKey("", className, KIND_TO_EXT.get(kind)); } else { return new FileKey(className.substring(0, pos), className.substring(pos + 1), KIND_TO_EXT.get(kind)); } } else { throw new IllegalArgumentException("Kind " + kind + " not accepted"); } }
public static FileKey newJavaName(String className, JavaFileObject.Kind kind) { if (kind == JavaFileObject.Kind.SOURCE || kind == JavaFileObject.Kind.CLASS) { int pos = className.lastIndexOf('.'); if (pos == -1) { return new FileKey("", className, KIND_TO_EXT.get(kind)); } else { return new FileKey(className.substring(0, pos), className.substring(pos + 1), KIND_TO_EXT.get(kind)); } } else { throw new IllegalArgumentException("Kind " + kind + " not accepted"); } }
public static FileKey newJavaName(String packageName, String name) { String ext; if (name.endsWith(".java")) { ext = "java"; } else if (name.endsWith(".class")) { ext = "class"; } else { throw new IllegalArgumentException("Illegal name " + name); } String rawName = name.substring(0, name.length() - 1 - ext.length()); return new FileKey(packageName, rawName, ext); }
public static FileKey newJavaName(String packageName, String name) { String ext; if (name.endsWith(".java")) { ext = "java"; } else if (name.endsWith(".class")) { ext = "class"; } else { throw new IllegalArgumentException("Illegal name " + name); } String rawName = name.substring(0, name.length() - 1 - ext.length()); return new FileKey(packageName, rawName, ext); }
public static FileKey newName(Path.Absolute path) { return new FileKey(path.getDirs().toString(), path.getRawName(), path.getExt()); }
public static FileKey newName(Path.Absolute path) { return new FileKey(path.getDirs().toString(), path.getRawName(), path.getExt()); }