Naming conventions for packages and types
The package name is the namespace for the class, interface, enhancement, enumeration, or other type. Defining a package prevents ambiguity about what class is accessed.
The following restrictions apply to package names.
- Package names use only lowercase characters.
- The root package name must not be a Gosu or Java strong keyword, such as
int. - Any subsequent part of the package name can be any name that conforms to Gosu naming conventions. You can use any Gosu or Java strong keyword. If you use a Java strong keyword, Studio displays a warning message that you will not be able to create classes in the package. This warning applies only to Java classes. You can create a Gosu class in the package.
Class names or other type names must always start with a capital letter. Type names can contain additional capital letters later in the name for clarity. If you write Gosu enhancements, the naming rules are slightly different from the conventions for other types.
Use the following standard package naming conventions:
|
Type of class |
Package |
Example of fully qualified class name |
|---|---|---|
|
Classes you define |
companyname.subpackage |
smithco.messaging.QueueUtils |
|
Guidewire Professional Services classes |
gwservices.subpackage |
gwservices.messaging.QueueUtils |
Warning: Your types must never use a package name with the prefix
com.guidewire. or the prefix gw. Those package namespaces are reserved for
internal types.
See also
