public class CoreNutsUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CoreNutsUtils.NutsDefaultThreadFactory |
| Modifier and Type | Field and Description |
|---|---|
static String[] |
COLOR_NAMES |
static DateTimeFormatter |
DEFAULT_DATE_TIME_FORMATTER |
static int |
DEFAULT_DATE_TIME_FORMATTER_LENGTH |
static int |
DEFAULT_UUID_LENGTH |
static String |
LOCAL_NUTS_FOLDER
vpc-public-nuts local repository at ${home.config}/.vpc-public-nuts
|
static int |
LOCK_TIME |
static TimeUnit |
LOCK_TIME_UNIT |
static Comparator<net.thevpc.nuts.NutsDefinition> |
NUTS_FILE_COMPARATOR |
static Comparator<net.thevpc.nuts.NutsId> |
NUTS_ID_COMPARATOR |
static CoreNutsUtils.NutsDefaultThreadFactory |
nutsDefaultThreadFactory |
static Map<String,String> |
QUERY_EMPTY_ENV |
| Constructor and Description |
|---|
CoreNutsUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
acceptClassifier(net.thevpc.nuts.NutsIdLocation location,
String classifier) |
static boolean |
acceptMonitoring(net.thevpc.nuts.NutsSession session) |
static boolean |
acceptProgress(net.thevpc.nuts.NutsSession session) |
static Map<String,String> |
applyMapProperties(Map<String,String> child,
Function<String,String> properties) |
static net.thevpc.nuts.NutsId |
applyNutsIdInheritance(net.thevpc.nuts.NutsId child,
net.thevpc.nuts.NutsId parent,
net.thevpc.nuts.NutsWorkspace ws) |
static String |
applyStringInheritance(String child,
String parent) |
static net.thevpc.nuts.NutsVersion |
applyStringProperties(net.thevpc.nuts.NutsVersion child,
Function<String,String> properties,
net.thevpc.nuts.NutsWorkspace ws) |
static String[] |
applyStringProperties(String[] child,
Function<String,String> properties) |
static String |
applyStringProperties(String child,
Function<String,String> properties) |
static boolean |
containsVars(net.thevpc.nuts.NutsId id) |
static Properties |
copyOfNonNull(Properties p) |
static Properties |
copyOfOrNull(Properties p) |
static net.thevpc.nuts.NutsString |
desc(Object s,
net.thevpc.nuts.NutsTextManager text) |
static net.thevpc.nuts.NutsId |
findNutsIdBySimpleName(net.thevpc.nuts.NutsId id,
Collection<net.thevpc.nuts.NutsId> all) |
static String |
formatImport(List<String> imports) |
static net.thevpc.nuts.NutsString |
formatLogValue(net.thevpc.nuts.NutsTextManager text,
Object unresolved,
Object resolved) |
static int |
getApiVersionOrdinalNumber(String s) |
static String |
getArrItem(String[] a,
int index) |
static String |
idToPath(net.thevpc.nuts.NutsId id) |
static boolean |
isDefaultOptional(String s1) |
static boolean |
isEffectiveId(net.thevpc.nuts.NutsId id) |
static boolean |
isEffectiveValue(String value) |
static boolean |
isIncludesHelpOption(String[] cmd) |
static boolean |
isUnsupportedFetchModeException(Throwable ex) |
static boolean |
isValidIdentifier(String s) |
static boolean |
isValidWorkspaceName(String workspace) |
static Iterator<net.thevpc.nuts.NutsDependency> |
itIdToDep(Iterator<net.thevpc.nuts.NutsId> id) |
static Iterator<net.thevpc.nuts.NutsDependency> |
itIdToDep(Iterator<net.thevpc.nuts.NutsId> id,
net.thevpc.nuts.NutsDependency copyFrom) |
static boolean |
matchesSimpleNameStaticVersion(net.thevpc.nuts.NutsId id,
net.thevpc.nuts.NutsId pattern) |
static String[] |
nonNullArray_Locations(String[] a) |
static String[] |
nonNullArray_LocationsAndOses(String[] a) |
static String[] |
nonNullArray(String[] a,
int size) |
static String[] |
nullArray_Locations(String[] a) |
static String[] |
nullArray_LocationsAndOses(String[] a) |
static String[] |
nullArray(String[] a,
int size) |
static net.thevpc.nuts.NutsRepositoryRef |
optionsToRef(net.thevpc.nuts.NutsAddRepositoryOptions options) |
static Set<String> |
parseProgressOptions(net.thevpc.nuts.NutsSession session) |
static String |
randomColorName() |
static net.thevpc.nuts.NutsContentType |
readOptionOutputFormat(net.thevpc.nuts.NutsCommandLine cmdLine) |
static net.thevpc.nuts.NutsAddRepositoryOptions |
refToOptions(net.thevpc.nuts.NutsRepositoryRef ref) |
static String |
repeat(char txt,
int count) |
static String |
resolveValidWorkspaceName(String workspace) |
static net.thevpc.nuts.NutsSession |
silent(net.thevpc.nuts.NutsSession session) |
static <T> T |
simplify(T any) |
static <T> T[] |
simplifyAndShrink(Class<T> cls,
T... any) |
static <T extends net.thevpc.nuts.NutsFilter> |
simplifyAndShrinkFilters(Class<T> cls,
Predicate<T> onRemove,
T... any) |
static <T extends net.thevpc.nuts.NutsFilter> |
simplifyFilterAnd(net.thevpc.nuts.NutsWorkspace ws,
Class<T> cls,
T base,
net.thevpc.nuts.NutsFilter... all) |
static <T extends net.thevpc.nuts.NutsFilter> |
simplifyFilterNone(net.thevpc.nuts.NutsWorkspace ws,
Class<T> cls,
T base,
net.thevpc.nuts.NutsFilter... all) |
static <T extends net.thevpc.nuts.NutsFilter> |
simplifyFilterOr(net.thevpc.nuts.NutsWorkspace ws,
Class<T> cls,
T base,
net.thevpc.nuts.NutsFilter... all) |
static Map<String,Object> |
traceJsonNutsDefinition(net.thevpc.nuts.NutsSession session,
net.thevpc.nuts.NutsDefinition def) |
static void |
traceMessage(net.thevpc.nuts.NutsLogger log,
Level lvl,
String name,
net.thevpc.nuts.NutsSession session,
net.thevpc.nuts.NutsFetchMode fetchMode,
net.thevpc.nuts.NutsId id,
net.thevpc.nuts.NutsLogVerb tracePhase,
String title,
long startTime,
net.thevpc.nuts.NutsMessage extraMsg) |
public static final String LOCAL_NUTS_FOLDER
public static final int DEFAULT_UUID_LENGTH
public static final int DEFAULT_DATE_TIME_FORMATTER_LENGTH
public static final DateTimeFormatter DEFAULT_DATE_TIME_FORMATTER
public static final String[] COLOR_NAMES
public static final int LOCK_TIME
public static final TimeUnit LOCK_TIME_UNIT
public static final CoreNutsUtils.NutsDefaultThreadFactory nutsDefaultThreadFactory
public static Comparator<net.thevpc.nuts.NutsId> NUTS_ID_COMPARATOR
public static Comparator<net.thevpc.nuts.NutsDefinition> NUTS_FILE_COMPARATOR
public static String randomColorName()
public static String repeat(char txt, int count)
public static net.thevpc.nuts.NutsId findNutsIdBySimpleName(net.thevpc.nuts.NutsId id,
Collection<net.thevpc.nuts.NutsId> all)
public static boolean isEffectiveValue(String value)
public static boolean isEffectiveId(net.thevpc.nuts.NutsId id)
public static boolean containsVars(net.thevpc.nuts.NutsId id)
public static String[] applyStringProperties(String[] child, Function<String,String> properties)
public static Map<String,String> applyMapProperties(Map<String,String> child, Function<String,String> properties)
public static net.thevpc.nuts.NutsVersion applyStringProperties(net.thevpc.nuts.NutsVersion child,
Function<String,String> properties,
net.thevpc.nuts.NutsWorkspace ws)
public static String applyStringProperties(String child, Function<String,String> properties)
public static <T> T simplify(T any)
public static <T extends net.thevpc.nuts.NutsFilter> T simplifyFilterOr(net.thevpc.nuts.NutsWorkspace ws,
Class<T> cls,
T base,
net.thevpc.nuts.NutsFilter... all)
public static <T extends net.thevpc.nuts.NutsFilter> T simplifyFilterAnd(net.thevpc.nuts.NutsWorkspace ws,
Class<T> cls,
T base,
net.thevpc.nuts.NutsFilter... all)
public static <T extends net.thevpc.nuts.NutsFilter> T simplifyFilterNone(net.thevpc.nuts.NutsWorkspace ws,
Class<T> cls,
T base,
net.thevpc.nuts.NutsFilter... all)
public static <T> T[] simplifyAndShrink(Class<T> cls, T... any)
public static <T extends net.thevpc.nuts.NutsFilter> T[] simplifyAndShrinkFilters(Class<T> cls, Predicate<T> onRemove, T... any)
public static net.thevpc.nuts.NutsId applyNutsIdInheritance(net.thevpc.nuts.NutsId child,
net.thevpc.nuts.NutsId parent,
net.thevpc.nuts.NutsWorkspace ws)
public static boolean isDefaultOptional(String s1)
public static boolean isValidIdentifier(String s)
public static net.thevpc.nuts.NutsRepositoryRef optionsToRef(net.thevpc.nuts.NutsAddRepositoryOptions options)
public static net.thevpc.nuts.NutsAddRepositoryOptions refToOptions(net.thevpc.nuts.NutsRepositoryRef ref)
public static net.thevpc.nuts.NutsSession silent(net.thevpc.nuts.NutsSession session)
public static Map<String,Object> traceJsonNutsDefinition(net.thevpc.nuts.NutsSession session, net.thevpc.nuts.NutsDefinition def)
public static boolean isIncludesHelpOption(String[] cmd)
public static void traceMessage(net.thevpc.nuts.NutsLogger log,
Level lvl,
String name,
net.thevpc.nuts.NutsSession session,
net.thevpc.nuts.NutsFetchMode fetchMode,
net.thevpc.nuts.NutsId id,
net.thevpc.nuts.NutsLogVerb tracePhase,
String title,
long startTime,
net.thevpc.nuts.NutsMessage extraMsg)
public static net.thevpc.nuts.NutsContentType readOptionOutputFormat(net.thevpc.nuts.NutsCommandLine cmdLine)
public static boolean matchesSimpleNameStaticVersion(net.thevpc.nuts.NutsId id,
net.thevpc.nuts.NutsId pattern)
public static int getApiVersionOrdinalNumber(String s)
public static boolean isValidWorkspaceName(String workspace)
public static String idToPath(net.thevpc.nuts.NutsId id)
public static Properties copyOfNonNull(Properties p)
public static Properties copyOfOrNull(Properties p)
public static boolean acceptClassifier(net.thevpc.nuts.NutsIdLocation location,
String classifier)
public static net.thevpc.nuts.NutsString formatLogValue(net.thevpc.nuts.NutsTextManager text,
Object unresolved,
Object resolved)
public static net.thevpc.nuts.NutsString desc(Object s, net.thevpc.nuts.NutsTextManager text)
public static boolean isUnsupportedFetchModeException(Throwable ex)
public static Set<String> parseProgressOptions(net.thevpc.nuts.NutsSession session)
public static boolean acceptProgress(net.thevpc.nuts.NutsSession session)
public static boolean acceptMonitoring(net.thevpc.nuts.NutsSession session)
public static Iterator<net.thevpc.nuts.NutsDependency> itIdToDep(Iterator<net.thevpc.nuts.NutsId> id)
Copyright © 2021 vpc open source initiative. All rights reserved.