Class ClasspathEntry

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.ClasspathEntry
All Implemented Interfaces:
IClasspathEntry

public class ClasspathEntry extends Object implements IClasspathEntry
See Also:
IClasspathEntry
  • Field Details

    • TAG_CLASSPATH

      public static final String TAG_CLASSPATH
      See Also:
      Constant Field Values
    • TAG_CLASSPATHENTRY

      public static final String TAG_CLASSPATHENTRY
      See Also:
      Constant Field Values
    • TAG_REFERENCED_ENTRY

      public static final String TAG_REFERENCED_ENTRY
      See Also:
      Constant Field Values
    • TAG_OUTPUT

      public static final String TAG_OUTPUT
      See Also:
      Constant Field Values
    • TAG_KIND

      public static final String TAG_KIND
      See Also:
      Constant Field Values
    • TAG_PATH

      public static final String TAG_PATH
      See Also:
      Constant Field Values
    • TAG_SOURCEPATH

      public static final String TAG_SOURCEPATH
      See Also:
      Constant Field Values
    • TAG_ROOTPATH

      public static final String TAG_ROOTPATH
      See Also:
      Constant Field Values
    • TAG_EXPORTED

      public static final String TAG_EXPORTED
      See Also:
      Constant Field Values
    • TAG_INCLUDING

      public static final String TAG_INCLUDING
      See Also:
      Constant Field Values
    • TAG_EXCLUDING

      public static final String TAG_EXCLUDING
      See Also:
      Constant Field Values
    • TAG_ATTRIBUTES

      public static final String TAG_ATTRIBUTES
      See Also:
      Constant Field Values
    • TAG_ATTRIBUTE

      public static final String TAG_ATTRIBUTE
      See Also:
      Constant Field Values
    • TAG_ATTRIBUTE_NAME

      public static final String TAG_ATTRIBUTE_NAME
      See Also:
      Constant Field Values
    • TAG_ATTRIBUTE_VALUE

      public static final String TAG_ATTRIBUTE_VALUE
      See Also:
      Constant Field Values
    • TAG_COMBINE_ACCESS_RULES

      public static final String TAG_COMBINE_ACCESS_RULES
      See Also:
      Constant Field Values
    • TAG_ACCESS_RULES

      public static final String TAG_ACCESS_RULES
      See Also:
      Constant Field Values
    • TAG_ACCESS_RULE

      public static final String TAG_ACCESS_RULE
      See Also:
      Constant Field Values
    • TAG_PATTERN

      public static final String TAG_PATTERN
      See Also:
      Constant Field Values
    • TAG_ACCESSIBLE

      public static final String TAG_ACCESSIBLE
      See Also:
      Constant Field Values
    • TAG_NON_ACCESSIBLE

      public static final String TAG_NON_ACCESSIBLE
      See Also:
      Constant Field Values
    • TAG_DISCOURAGED

      public static final String TAG_DISCOURAGED
      See Also:
      Constant Field Values
    • TAG_IGNORE_IF_BETTER

      public static final String TAG_IGNORE_IF_BETTER
      See Also:
      Constant Field Values
    • entryKind

      public int entryKind
      Describes the kind of classpath entry - one of CPE_PROJECT, CPE_LIBRARY, CPE_SOURCE, CPE_VARIABLE or CPE_CONTAINER
    • contentKind

      public int contentKind
      Describes the kind of package fragment roots found on this classpath entry - either K_BINARY or K_SOURCE or K_OUTPUT.
    • path

      public org.eclipse.core.runtime.IPath path
      The meaning of the path of a classpath entry depends on its entry kind:
      • Source code in the current project (CPE_SOURCE) - The path associated with this entry is the absolute path to the root folder.
      • A binary library in the current project (CPE_LIBRARY) - the path associated with this entry is the absolute path to the JAR (or root folder), and in case it refers to an external JAR, then there is no associated resource in the workbench.
      • A required project (CPE_PROJECT) - the path of the entry denotes the path to the corresponding project resource.
      • A variable entry (CPE_VARIABLE) - the first segment of the path is the name of a classpath variable. If this classpath variable is bound to the path P, the path of the corresponding classpath entry is computed by appending to P the segments of the returned path without the variable.
      • A container entry (CPE_CONTAINER) - the first segment of the path is denoting the unique container identifier (for which a ClasspathContainerInitializer could be registered), and the remaining segments are used as additional hints for resolving the container entry to an actual IClasspathContainer.
    • NO_ENTRIES

      public static final ClasspathEntry[] NO_ENTRIES
    • INCLUDE_ALL

      public static final org.eclipse.core.runtime.IPath[] INCLUDE_ALL
    • EXCLUDE_NONE

      public static final org.eclipse.core.runtime.IPath[] EXCLUDE_NONE
    • NO_EXTRA_ATTRIBUTES

      public static final IClasspathAttribute[] NO_EXTRA_ATTRIBUTES
    • NO_ACCESS_RULES

      public static final IAccessRule[] NO_ACCESS_RULES
    • sourceAttachmentPath

      public org.eclipse.core.runtime.IPath sourceAttachmentPath
      Describes the path to the source archive associated with this classpath entry, or null if this classpath entry has no source attachment.

      Only library and variable classpath entries may have source attachments. For library classpath entries, the result path (if present) locates a source archive. For variable classpath entries, the result path (if present) has an analogous form and meaning as the variable path, namely the first segment is the name of a classpath variable.

    • sourceAttachmentRootPath

      public org.eclipse.core.runtime.IPath sourceAttachmentRootPath
      Describes the path within the source archive where package fragments are located. An empty path indicates that packages are located at the root of the source archive. Returns a non-null value if and only if getSourceAttachmentPath returns a non-null value.
    • referencingEntry

      public IClasspathEntry referencingEntry
    • specificOutputLocation

      public org.eclipse.core.runtime.IPath specificOutputLocation
      Specific output location (for this source entry)
    • K_OUTPUT

      public static final int K_OUTPUT
      A constant indicating an output location.
      See Also:
      Constant Field Values
    • DOT_DOT

      public static final String DOT_DOT
      See Also:
      Constant Field Values
    • isExported

      public boolean isExported
      The export flag
    • extraAttributes

      public IClasspathAttribute[] extraAttributes
      The extra attributes
  • Constructor Details

    • ClasspathEntry

      public ClasspathEntry(int contentKind, int entryKind, org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IPath[] inclusionPatterns, org.eclipse.core.runtime.IPath[] exclusionPatterns, org.eclipse.core.runtime.IPath sourceAttachmentPath, org.eclipse.core.runtime.IPath sourceAttachmentRootPath, org.eclipse.core.runtime.IPath specificOutputLocation, boolean isExported, IAccessRule[] accessRules, boolean combineAccessRules, IClasspathAttribute[] extraAttributes)
    • ClasspathEntry

      public ClasspathEntry(int contentKind, int entryKind, org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IPath[] inclusionPatterns, org.eclipse.core.runtime.IPath[] exclusionPatterns, org.eclipse.core.runtime.IPath sourceAttachmentPath, org.eclipse.core.runtime.IPath sourceAttachmentRootPath, org.eclipse.core.runtime.IPath specificOutputLocation, IClasspathEntry referencingEntry, boolean isExported, IAccessRule[] accessRules, boolean combineAccessRules, IClasspathAttribute[] extraAttributes)
      Creates a class path entry of the specified kind with the given path.
  • Method Details

    • combineAccessRules

      public boolean combineAccessRules()
      Description copied from interface: IClasspathEntry
      Returns whether the access rules of the project's exported entries should be combined with this entry's access rules. Returns true for container entries. Returns false otherwise.
      Specified by:
      combineAccessRules in interface IClasspathEntry
      Returns:
      whether the access rules of the project's exported entries should be combined with this entry's access rules
    • combineWith

      public ClasspathEntry combineWith(ClasspathEntry referringEntry)
      Used to perform export/restriction propagation across referring projects/containers. Also: propagating extraAttributes.
    • withExtraAttributeRemoved

      public ClasspathEntry withExtraAttributeRemoved(String attrName)
    • fullExclusionPatternChars

      public char[][] fullExclusionPatternChars()
    • fullInclusionPatternChars

      public char[][] fullInclusionPatternChars()
    • elementEncode

      public void elementEncode(org.aspectj.org.eclipse.jdt.internal.core.XMLWriter writer, org.eclipse.core.runtime.IPath projectPath, boolean indent, boolean newLine, Map unknownElements, boolean isReferencedEntry)
      Returns the XML encoding of the class path.
    • elementDecode

      public static IClasspathEntry elementDecode(Element element, IJavaProject project, Map unknownElements)
    • hasDotDot

      public static boolean hasDotDot(org.eclipse.core.runtime.IPath path)
    • getChildAttributes

      public static NodeList getChildAttributes(String childName, NodeList children, boolean[] foundChildren)
    • resolvedChainedLibraries

      public static org.eclipse.core.runtime.IPath[] resolvedChainedLibraries(org.eclipse.core.runtime.IPath jarPath)
    • resolveDotDot

      public static org.eclipse.core.runtime.IPath resolveDotDot(org.eclipse.core.runtime.IPath reference, org.eclipse.core.runtime.IPath path)
    • equals

      public boolean equals(Object object)
      Returns true if the given object is a classpath entry with equivalent attributes.
      Overrides:
      equals in class Object
    • getAccessRules

      public IAccessRule[] getAccessRules()
      Description copied from interface: IClasspathEntry
      Returns the possibly empty list of access rules for this entry.
      Specified by:
      getAccessRules in interface IClasspathEntry
      Returns:
      the possibly empty list of access rules for this entry
      See Also:
      IClasspathEntry.getAccessRules()
    • getAccessRuleSet

      public AccessRuleSet getAccessRuleSet()
    • getContentKind

      public int getContentKind()
      Description copied from interface: IClasspathEntry
      Returns the kind of files found in the package fragments identified by this classpath entry.
      Specified by:
      getContentKind in interface IClasspathEntry
      Returns:
      IPackageFragmentRoot.K_SOURCE for files containing source code, and IPackageFragmentRoot.K_BINARY for binary class files. There is no specified value for an entry denoting a variable (IClasspathEntry.CPE_VARIABLE) or a classpath container (IClasspathEntry.CPE_CONTAINER).
      See Also:
      IClasspathEntry
    • getEntryKind

      public int getEntryKind()
      Description copied from interface: IClasspathEntry
      Returns the kind of this classpath entry.
      Specified by:
      getEntryKind in interface IClasspathEntry
      Returns:
      one of:
      See Also:
      IClasspathEntry
    • getExclusionPatterns

      public org.eclipse.core.runtime.IPath[] getExclusionPatterns()
      Description copied from interface: IClasspathEntry
      Returns the set of patterns used to exclude resources or classes associated with this classpath entry.

      For source classpath entries, exclusion patterns allow specified portions of the resource tree rooted at this source entry's path to be filtered out. If no exclusion patterns are specified, this source entry includes all relevent files. Each path specified must be a relative path, and will be interpreted relative to this source entry's path. File patterns are case-sensitive. A file matched by one or more of these patterns is excluded from the corresponding package fragment root. Exclusion patterns have higher precedence than inclusion patterns; in other words, exclusion patterns can remove files for the ones that are to be included, not the other way around.

      Note that there is no need to supply a pattern to exclude ".class" files because a source entry filters these out automatically.

      The pattern mechanism is similar to Ant's. Each pattern is represented as a relative path. The path segments can be regular file or folder names or simple patterns involving standard wildcard characters.

      '*' matches 0 or more characters within a segment. So *.java matches .java, a.java and Foo.java, but not Foo.properties (does not end with .java).

      '?' matches 1 character within a segment. So ?.java matches a.java, A.java, but not .java or xyz.java (neither have just one character before .java).

      Combinations of *'s and ?'s are allowed.

      The special pattern '**' matches zero or more segments. In a source entry, a path like tests/ that ends in a trailing separator is interpreted as tests/**, and would match everything under the folder named tests.

      Example patterns in source entries (assuming that "java" is the only Java-like extension):

      • tests/** (or simply tests/) matches all files under a root folder named tests. This includes tests/Foo.java and tests/com/example/Foo.java, but not com/example/tests/Foo.java (not under a root folder named tests).
      • tests/* matches all files directly below a root folder named tests. This includes tests/Foo.java and tests/FooHelp.java but not tests/com/example/Foo.java (not directly under a folder named tests) or com/Foo.java (not under a folder named tests).
      • **/tests/** matches all files under any folder named tests. This includes tests/Foo.java, com/examples/tests/Foo.java, and com/examples/tests/unit/Foo.java, but not com/example/Foo.java (not under a folder named tests).
      Specified by:
      getExclusionPatterns in interface IClasspathEntry
      Returns:
      the possibly empty list of resource exclusion patterns associated with this classpath entry, or null if this kind of classpath entry does not support exclusion patterns
      See Also:
      IClasspathEntry.getExclusionPatterns()
    • getExtraAttributes

      public IClasspathAttribute[] getExtraAttributes()
      Description copied from interface: IClasspathEntry
      Returns the extra classpath attributes for this classpath entry. Returns an empty array if this entry has no extra attributes.
      Specified by:
      getExtraAttributes in interface IClasspathEntry
      Returns:
      the possibly empty list of extra classpath attributes for this classpath entry
    • getInclusionPatterns

      public org.eclipse.core.runtime.IPath[] getInclusionPatterns()
      Description copied from interface: IClasspathEntry
      Returns the set of patterns used to explicitly define resources or classes to be included with this classpath entry.

      For source classpath entries, when no inclusion patterns are specified, the source entry includes all relevent files in the resource tree rooted at this source entry's path. Specifying one or more inclusion patterns means that only the specified portions of the resource tree are to be included. Each path specified must be a relative path, and will be interpreted relative to this source entry's path. File patterns are case-sensitive. A file matched by one or more of these patterns is included in the corresponding package fragment root unless it is excluded by one or more of this entrie's exclusion patterns. Exclusion patterns have higher precedence than inclusion patterns; in other words, exclusion patterns can remove files for the ones that are to be included, not the other way around.

      See IClasspathEntry.getExclusionPatterns() for a discussion of the syntax and semantics of path patterns. The absence of any inclusion patterns is semantically equivalent to the explicit inclusion pattern **.

      Example patterns in source entries:

      • The inclusion pattern src/** by itself includes all files under a root folder named src.
      • The inclusion patterns src/** and tests/** includes all files under the root folders named src and tests.
      • The inclusion pattern src/** together with the exclusion pattern src/**/Foo.java includes all files under a root folder named src except for ones named Foo.java.
      Specified by:
      getInclusionPatterns in interface IClasspathEntry
      Returns:
      the possibly empty list of resource inclusion patterns associated with this classpath entry, or null if this kind of classpath entry does not support inclusion patterns
      See Also:
      IClasspathEntry.getExclusionPatterns()
    • getOutputLocation

      public org.eclipse.core.runtime.IPath getOutputLocation()
      Description copied from interface: IClasspathEntry
      Returns the full path to the specific location where the builder writes .class files generated for this source entry (entry kind IClasspathEntry.CPE_SOURCE).

      Source entries can optionally be associated with a specific output location. If none is provided, the source entry will be implicitly associated with its project default output location (see IJavaProject.getOutputLocation()).

      NOTE: A specific output location cannot coincidate with another source/library entry.

      Specified by:
      getOutputLocation in interface IClasspathEntry
      Returns:
      the full path to the specific location where the builder writes .class files for this source entry, or null if using default output folder
      See Also:
      IClasspathEntry.getOutputLocation()
    • getPath

      public org.eclipse.core.runtime.IPath getPath()
      Description copied from interface: IClasspathEntry
      Returns the path of this classpath entry. The meaning of the path of a classpath entry depends on its entry kind:
      • Source code in the current project (IClasspathEntry.CPE_SOURCE) - The path associated with this entry is the absolute path to the root folder.
      • A binary library in the current project (IClasspathEntry.CPE_LIBRARY) - the path associated with this entry is the absolute path to the JAR (or root folder), and in case it refers to an external library, then there is no associated resource in the workbench.
      • A required project (IClasspathEntry.CPE_PROJECT) - the path of the entry denotes the path to the corresponding project resource.
      • A variable entry (IClasspathEntry.CPE_VARIABLE) - the first segment of the path is the name of a classpath variable. If this classpath variable is bound to the path P, the path of the corresponding classpath entry is computed by appending to P the segments of the returned path without the variable.
      • A container entry (IClasspathEntry.CPE_CONTAINER) - the path of the entry is the name of the classpath container, which can be bound indirectly to a set of classpath entries after resolution. The containerPath is a formed by a first ID segment followed with extra segments that can be used as additional hints for resolving this container reference (also see IClasspathContainer).
      Specified by:
      getPath in interface IClasspathEntry
      Returns:
      the path of this classpath entry
      See Also:
      IClasspathEntry
    • getSourceAttachmentPath

      public org.eclipse.core.runtime.IPath getSourceAttachmentPath()
      Description copied from interface: IClasspathEntry
      Returns the path to the source archive or folder associated with this classpath entry, or null if this classpath entry has no source attachment.

      Only library and variable classpath entries may have source attachments. For library classpath entries, the result path (if present) locates a source archive or folder. This archive or folder can be located in a project of the workspace or outside the workspace. For variable classpath entries, the result path (if present) has an analogous form and meaning as the variable path, namely the first segment is the name of a classpath variable.

      Specified by:
      getSourceAttachmentPath in interface IClasspathEntry
      Returns:
      the path to the source archive or folder, or null if none
      See Also:
      IClasspathEntry
    • getSourceAttachmentRootPath

      public org.eclipse.core.runtime.IPath getSourceAttachmentRootPath()
      Description copied from interface: IClasspathEntry
      Returns the path within the source archive or folder where package fragments are located. An empty path indicates that packages are located at the root of the source archive or folder. Returns a non-null value if and only if IClasspathEntry.getSourceAttachmentPath() returns a non-null value.
      Specified by:
      getSourceAttachmentRootPath in interface IClasspathEntry
      Returns:
      the path within the source archive or folder, or null if not applicable
      See Also:
      IClasspathEntry
    • getExternalAnnotationPath

      public static org.eclipse.core.runtime.IPath getExternalAnnotationPath(IClasspathEntry entry, org.eclipse.core.resources.IProject project, boolean resolve)
      Internal API: answer the path for external annotations (for null analysis) associated with the given classpath entry. Four shapes of paths are supported:
      1. relative, variable (VAR/relpath): resolve classpath variable VAR and append relpath
      2. relative, project (relpath): interpret relpath as a relative path within the given project
      3. absolute, workspace (/Proj/relpath): an absolute path in the workspace
      4. absolute, filesystem (/abspath): an absolute path in the filesystem
      In case of ambiguity, workspace lookup has higher priority than filesystem lookup (in fact filesystem paths are never validated).
      Parameters:
      entry - classpath entry to work on
      project - project whose classpath we are analysing
      resolve - if true, any workspace-relative paths will be resolved to filesystem paths.
      Returns:
      a path (in the workspace or filesystem-absolute) or null
    • getExtraAttribute

      public static String getExtraAttribute(IClasspathEntry entry, String attributeName)
    • getReferencingEntry

      public IClasspathEntry getReferencingEntry()
      Description copied from interface: IClasspathEntry
      Returns the classpath entry that is making a reference to this classpath entry. For entry kinds IClasspathEntry.CPE_LIBRARY, the return value is the entry that is representing the JAR that includes this in the MANIFEST.MF file's Class-Path section. For entry kinds other than IClasspathEntry.CPE_LIBRARY, this returns null. For those entries that are on the raw classpath already, this returns null.

      It is possible that multiple library entries refer to the same entry via the MANIFEST.MF file. In those cases, this method returns the first classpath entry that appears in the raw classpath. However, this does not mean that the other referencing entries do not relate to their referenced entries. See JavaCore.getReferencedClasspathEntries(IClasspathEntry, IJavaProject) for more details.

      Specified by:
      getReferencingEntry in interface IClasspathEntry
      Returns:
      the classpath entry that is referencing this entry or null if not applicable.
    • hashCode

      public int hashCode()
      Returns the hash code for this classpath entry
      Overrides:
      hashCode in class Object
    • isExported

      public boolean isExported()
      Description copied from interface: IClasspathEntry
      Returns whether this entry is exported to dependent projects. Always returns false for source entries (kind IClasspathEntry.CPE_SOURCE), which cannot be exported.
      Specified by:
      isExported in interface IClasspathEntry
      Returns:
      true if exported, and false otherwise
      See Also:
      IClasspathEntry.isExported()
    • isOptional

      public boolean isOptional()
    • isModular

      public boolean isModular()
    • getSourceAttachmentEncoding

      public String getSourceAttachmentEncoding()
    • getAccessRules

      public static IAccessRule[] getAccessRules(org.eclipse.core.runtime.IPath[] accessibleFiles, org.eclipse.core.runtime.IPath[] nonAccessibleFiles)
    • toString

      public String toString()
      Returns a printable representation of this classpath entry.
      Overrides:
      toString in class Object
    • resolvedDotDot

      public ClasspathEntry resolvedDotDot(org.eclipse.core.runtime.IPath reference)
    • resolvedChainedLibraries

      public ClasspathEntry[] resolvedChainedLibraries()
    • rootID

      public String rootID()
      Answers an ID which is used to distinguish entries during package fragment root computations
    • getResolvedEntry

      public IClasspathEntry getResolvedEntry()
      Deprecated.
      Description copied from interface: IClasspathEntry
      This is a helper method, which returns the resolved classpath entry denoted by an entry (if it is a variable entry). It is obtained by resolving the variable reference in the first segment. Returns null if unable to resolve using the following algorithm:
      • if variable segment cannot be resolved, returns null
      • finds a project, JAR or binary folder in the workspace at the resolved path location
      • if none finds an external JAR file or folder outside the workspace at the resolved path location
      • if none returns null

      Variable source attachment is also resolved and recorded in the resulting classpath entry.

      Specified by:
      getResolvedEntry in interface IClasspathEntry
      Returns:
      the resolved library or project classpath entry, or null if the given path could not be resolved to a classpath entry

      Note that this deprecated API doesn't handle CPE_CONTAINER entries.

      See Also:
      IClasspathEntry
    • getLibraryIndexLocation

      public URL getLibraryIndexLocation()
      This function computes the URL of the index location for this classpath entry. It returns null if the URL is invalid.
    • ignoreOptionalProblems

      public boolean ignoreOptionalProblems()
    • validateClasspath

      public static IJavaModelStatus validateClasspath(IJavaProject javaProject, IClasspathEntry[] rawClasspath, org.eclipse.core.runtime.IPath projectOutputLocation)
      Validate a given classpath and output location for a project, using the following rules:
      • Classpath entries cannot collide with each other; that is, all entry paths must be unique.
      • The project output location path cannot be null, must be absolute and located inside the project.
      • Specific output locations (specified on source entries) can be null, if not they must be located inside the project,
      • A project entry cannot refer to itself directly (that is, a project cannot prerequisite itself).
      • Classpath entries or output locations cannot coincidate or be nested in each other, except for the following scenario listed below:
        • A source folder can coincidate with its own output location, in which case this output can then contain library archives. However, a specific output location cannot coincidate with any library or a distinct source folder than the one referring to it.
        • A source/library folder can be nested in any source folder as long as the nested folder is excluded from the enclosing one.
        • An output location can be nested in a source folder, if the source folder coincidates with the project itself, or if the output location is excluded from the source folder.
      Note that the classpath entries are not validated automatically. Only bound variables or containers are considered in the checking process (this allows to perform a consistency check on a classpath which has references to yet non existing projects, folders, ...).

      This validation is intended to anticipate classpath issues prior to assigning it to a project. In particular, it will automatically be performed during the classpath setting operation (if validation fails, the classpath setting will not complete).

      Parameters:
      javaProject - the given java project
      rawClasspath - a given classpath
      projectOutputLocation - a given output location
      Returns:
      a status object with code IStatus.OK if the given classpath and output location are compatible, otherwise a status object indicating what is wrong with the classpath or output location
    • validateClasspathEntry

      public static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment, boolean referredByContainer)
      Returns a Java model status describing the problem related to this classpath entry if any, a status object with code IStatus.OK if the entry is fine (that is, if the given classpath entry denotes a valid element to be referenced onto a classpath).
      Parameters:
      project - the given java project
      entry - the given classpath entry
      checkSourceAttachment - a flag to determine if source attachment should be checked
      referredByContainer - flag indicating whether the given entry is referred by a classpath container
      Returns:
      a java model status describing the problem related to this classpath entry if any, a status object with code IStatus.OK if the entry is fine
    • setSharedIndexLocation

      public static void setSharedIndexLocation(String value, Class<?> clazz) throws IllegalArgumentException
      Throws:
      IllegalArgumentException