@Test public void testOfStringIllegal() { Assertions.assertThrows(IllegalArgumentException.class, () -> { String packageName = "...batch.api.impl"; Devon4jPackage.of(packageName); }); }
public static Devon4jPackage of(String root, String application, String component, String layer, String scope, String detail) { String[] roots; if (root == null) { roots = new String[0]; } else { roots = root.split(REGEX_PKG_SEPARATOR); } String[] details; if (detail == null) { details = new String[0]; } else { details = detail.split(REGEX_PKG_SEPARATOR); } String[] segments = new String[roots.length + details.length + 4]; System.arraycopy(roots, 0, segments, 0, roots.length); int i = roots.length; segments[i++] = application; segments[i++] = component; segments[i++] = layer; segments[i++] = scope; System.arraycopy(details, 0, segments, i, details.length); return new Devon4jPackage(null, segments, root, detail, (i - 1)); }
Devon4jPackage { public static Devon4jPackage of(String root, String application, String component, String layer, String scope, String detail) { String[] roots; if (root == null) { roots = new String[0]; } else { roots = root.split(REGEX_PKG_SEPARATOR); } String[] details; if (detail == null) { details = new String[0]; } else { details = detail.split(REGEX_PKG_SEPARATOR); } String[] segments = new String[roots.length + details.length + 4]; System.arraycopy(roots, 0, segments, 0, roots.length); int i = roots.length; segments[i++] = application; segments[i++] = component; segments[i++] = layer; segments[i++] = scope; System.arraycopy(details, 0, segments, i, details.length); return new Devon4jPackage(null, segments, root, detail, (i - 1)); } }
Devon4jPackage { public static Devon4jPackage of(String root, String application, String component, String layer, String scope, String detail) { String[] roots; if (root == null) { roots = new String[0]; } else { roots = root.split(REGEX_PKG_SEPARATOR); } String[] details; if (detail == null) { details = new String[0]; } else { details = detail.split(REGEX_PKG_SEPARATOR); } String[] segments = new String[roots.length + details.length + 4]; System.arraycopy(roots, 0, segments, 0, roots.length); int i = roots.length; segments[i++] = application; segments[i++] = component; segments[i++] = layer; segments[i++] = scope; System.arraycopy(details, 0, segments, i, details.length); return new Devon4jPackage(null, segments, root, detail, (i - 1)); } private  Devon4jPackage(String pkg, String[] segments, String root, String detail, int scope); }
Devon4jPackage { public static Devon4jPackage of(String root, String application, String component, String layer, String scope, String detail) { String[] roots; if (root == null) { roots = new String[0]; } else { roots = root.split(REGEX_PKG_SEPARATOR); } String[] details; if (detail == null) { details = new String[0]; } else { details = detail.split(REGEX_PKG_SEPARATOR); } String[] segments = new String[roots.length + details.length + 4]; System.arraycopy(roots, 0, segments, 0, roots.length); int i = roots.length; segments[i++] = application; segments[i++] = component; segments[i++] = layer; segments[i++] = scope; System.arraycopy(details, 0, segments, i, details.length); return new Devon4jPackage(null, segments, root, detail, (i - 1)); } private  Devon4jPackage(String pkg, String[] segments, String root, String detail, int scope); int getSegmentCount(); String getSegment(int index); boolean isValid(); boolean isValidScope(); boolean isValidLayer(); String getRoot(); String getApplication(); String getComponent(); String getLayer(); boolean isLayerCommon(); boolean isLayerDataAccess(); boolean isLayerLogic(); boolean isLayerService(); boolean isLayerBatch(); boolean isLayerClient(); String getScope(); boolean isScopeApi(); boolean isScopeBase(); boolean isScopeImpl(); String getDetail(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static Devon4jPackage of(String root, String application, String component, String layer, String scope,
      String detail); static Devon4jPackage of(String packageName); static Devon4jPackage of(Package javaPackage); static Devon4jPackage of(Class<?> type); }
Devon4jPackage { public static Devon4jPackage of(String root, String application, String component, String layer, String scope, String detail) { String[] roots; if (root == null) { roots = new String[0]; } else { roots = root.split(REGEX_PKG_SEPARATOR); } String[] details; if (detail == null) { details = new String[0]; } else { details = detail.split(REGEX_PKG_SEPARATOR); } String[] segments = new String[roots.length + details.length + 4]; System.arraycopy(roots, 0, segments, 0, roots.length); int i = roots.length; segments[i++] = application; segments[i++] = component; segments[i++] = layer; segments[i++] = scope; System.arraycopy(details, 0, segments, i, details.length); return new Devon4jPackage(null, segments, root, detail, (i - 1)); } private  Devon4jPackage(String pkg, String[] segments, String root, String detail, int scope); int getSegmentCount(); String getSegment(int index); boolean isValid(); boolean isValidScope(); boolean isValidLayer(); String getRoot(); String getApplication(); String getComponent(); String getLayer(); boolean isLayerCommon(); boolean isLayerDataAccess(); boolean isLayerLogic(); boolean isLayerService(); boolean isLayerBatch(); boolean isLayerClient(); String getScope(); boolean isScopeApi(); boolean isScopeBase(); boolean isScopeImpl(); String getDetail(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static Devon4jPackage of(String root, String application, String component, String layer, String scope,
      String detail); static Devon4jPackage of(String packageName); static Devon4jPackage of(Package javaPackage); static Devon4jPackage of(Class<?> type); static final String LAYER_COMMON; static final String LAYER_DATA_ACCESS; static final String LAYER_LOGIC; static final String LAYER_SERVICE; static final String LAYER_BATCH; static final String LAYER_CLIENT; static final String SCOPE_API; static final String SCOPE_BASE; static final String SCOPE_IMPL; }