APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.module

public final Class Checks

extends Object
Class Inheritance
Imports
java.util.Set

Utility class for checking module, package, and class names.

Field Summary

Modifier and TypeField and Description
private static final Set<String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static boolean
isClassName(String name)

Returns true if the given name is a legal class name.

public static boolean
isJavaIdentifier(String str)

Returns true if the given string is a legal Java identifier, otherwise false.

public static boolean
isPackageName(String name)

Returns true if the given name is a legal package name.

private static boolean
isTypeName(String name)

Returns true if the given name is a legal type name.

public static String
requireModuleName(String name)

Checks a name to ensure that it's a legal module name.

public static String
requirePackageName(String name)

Checks a name to ensure that it's a legal package name.

public static String
requireQualifiedClassName(String what, String name)

Checks a name to ensure that it's a legal qualified class name in a named package.

public static String
requireServiceProviderName(String name)

Checks a name to ensure that it's a legal qualified class name.

public static String
requireServiceTypeName(String name)

Checks a name to ensure that it's a legal qualified class name

private static String
requireTypeName(String what, String name)

Checks if the given name is a legal type name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

RESERVEDback to summary
private static final Set<String> RESERVED

Constructor Detail

Checksback to summary
private Checks()

Method Detail

isClassNameback to summary
public static boolean isClassName(String name)

Returns true if the given name is a legal class name.

isJavaIdentifierback to summary
public static boolean isJavaIdentifier(String str)

Returns true if the given string is a legal Java identifier, otherwise false.

isPackageNameback to summary
public static boolean isPackageName(String name)

Returns true if the given name is a legal package name.

isTypeNameback to summary
private static boolean isTypeName(String name)

Returns true if the given name is a legal type name.

requireModuleNameback to summary
public static String requireModuleName(String name)

Checks a name to ensure that it's a legal module name.

Exceptions
IllegalArgumentException:
if name is null or not a legal module name
requirePackageNameback to summary
public static String requirePackageName(String name)

Checks a name to ensure that it's a legal package name.

Exceptions
IllegalArgumentException:
if name is null or not a legal package name
requireQualifiedClassNameback to summary
public static String requireQualifiedClassName(String what, String name)

Checks a name to ensure that it's a legal qualified class name in a named package.

Exceptions
IllegalArgumentException:
if name is null or not a legal qualified class name in a named package
requireServiceProviderNameback to summary
public static String requireServiceProviderName(String name)

Checks a name to ensure that it's a legal qualified class name.

Exceptions
IllegalArgumentException:
if name is null or not a legal qualified class name
requireServiceTypeNameback to summary
public static String requireServiceTypeName(String name)

Checks a name to ensure that it's a legal qualified class name

Exceptions
IllegalArgumentException:
if name is null or not a legal qualified class name
requireTypeNameback to summary
private static String requireTypeName(String what, String name)

Checks if the given name is a legal type name.

Exceptions
IllegalArgumentException:
if name is null or not a legal type name