Skip to main content

Access to class name

In the interface for accessing a class by specifying the class name, the class name and fuzzy match are evaluated as follows.

Fuzzy match option

  • If the fuzzy match option is set to true, the target class is searched for under the following conditions.

  • If the class name string does not include a namespace (does not include "."), the class name will be the target class if it matches the specified name.

  • If the class name string includes a namespace (includes "."), the class will be the target class if the fully qualified name of the class and the specified namespace match backwards.

  • Note that the namespace backwards match determination identifies the namespace name (the range separated by ".") as an exact match.

  • Example: If there is "MyPackage.Sample1.MyClass"

  • "Sample1.MyClass" is a backward match, so it is a target

  • "ple1.MyClass" is not a backward match, so it is not a target

  • If the fuzzy match option is set to false, the target class is searched for under the following conditions.

  • If the fully qualified name of the class exactly matches the specified string, it is the target class.

  • However, if the profile-limited option is specified in the class name string, it is evaluated based on whether it matches the namespace that is based on the profile reference package that corresponds to the applicable profile.

  • Note that if the profile-limited option is specified, the profile base package can be omitted when specifying the class namespace.

  • Example: If there is "MyPackage.Sample1.MyClass"

  • "MyPackage.Sample1.MyClass" is an exact match, so it is included

  • "MyClass" is not an exact match, so it is not included

  • "MyPackage::MyPackage.Sample1.MyClass" is included because it is an exact match with the namespace based on the profile reference package

  • "MyPackage::Sample1.MyClass" is included because it is an exact match with the namespace omitting the profile's base package

This allows you to determine the target class by a name that can be identified in a specific profile, even if the specific profile is added as a profile reference package under a package of any hierarchy.

Limiting the profile when specifying a class name

  • When searching for a class in a profile that imports multiple profile references, you can limit the class search range to a specific profile reference package by specifying a string that conforms to the following format for the class name.
  • Format: {profile name}::{class name or class name including namespace}
    If you specify a profile name, the search range for classes will be limited to those under the profile reference package that corresponds to the specified profile.
    This allows you to limit the search to classes contained in a specific profile, even if classes with the same name exist under multiple profile reference packages.