# com.bea.ide.lang.java
JavaUtil.NameParts Class

public static class JavaUtil.NameParts
extends `Object`

Breaks a fully qualified class name into it's package and name parts.

Hierarchy
  `Object`
  `JavaUtil.NameParts`

Enclosing class
  `JavaUtil`

## Field Summary

`public `String`` | `clazz` The non-qualified name of this type.
`public `String`` | `pkg` The package of this type

## Constructor Summary

JavaUtil.NameParts(`String` pkg, `String` clazz) Creates a NameParts object from an already parsed type name
JavaUtil.NameParts(`String` fullName) Constructs a new NameParts object, parsing a fully qualified type name.

## Method Summary

`public boolean` | `hasPackage`() Returns a boolean indicating whether this type is not in the default package.
`public `JavaUtil.NameParts`` | `setClass`(`String` clazz) Sets the class name of this NameParts object.
`public `JavaUtil.NameParts`` | `setPackage`(`String` pkg) Sets the package name of this NameParts object.
`public `String`` | `toString`() Returns the fully-qualified type name.

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Detail

### clazz

    public String clazz

  The non-qualified name of this type.

### pkg

    public String pkg

  The package of this type

## Constructor Detail

### JavaUtil.NameParts

    public JavaUtil.NameParts(String pkg,
                              String clazz)

  Creates a NameParts object from an already parsed type name

### JavaUtil.NameParts

    public JavaUtil.NameParts(String fullName)

  Constructs a new NameParts object, parsing a fully qualified type name.

## Method Detail

### hasPackage() Method

    public boolean hasPackage()

Returns a boolean indicating whether this type is not in the default package.

### setClass(String) Method

    public JavaUtil.NameParts setClass(String clazz)

Sets the class name of this NameParts object. This call modifies the object directly.

#### Parameters

clazz
  The new class name.

#### Returns

this

### setPackage(String) Method

    public JavaUtil.NameParts setPackage(String pkg)

Sets the package name of this NameParts object. This call modifies the object directly.

#### Parameters

pkg
  The new package name.

#### Returns

this

### toString() Method

    public String toString()

Returns the fully-qualified type name.

Overrides
  `Object.toString()`