com.google.gwt.core.ext.soyc.coderef

## Class PackageDescriptor

- java.lang.Object
- - com.google.gwt.core.ext.soyc.coderef.PackageDescriptor

    public class PackageDescriptor
    extends java.lang.Object

It contains all packages and they reference to classes `ClassDescriptor`.

### Field Summary

Fields
`static java.lang.String` `DEFAULT_PKG`

### Constructor Summary

Constructors
Constructor and Description
`PackageDescriptor(java.lang.String packageName, java.lang.String longPackageName)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `addClass(ClassDescriptor cls)`
`void` `addPackage(PackageDescriptor pkg)`
`static PackageDescriptor` `from(java.util.Map<java.lang.String,ClassDescriptor> codeModel)` Creates a package descriptor from a code model (mapping between class names and class descriptors).
`java.util.Map<java.lang.String,ClassDescriptor>` `getAllClassesByName()` Returns all classes in this package and its subpackages in a form of mapping between qualified class name and class descriptor.
`java.util.Collection<ClassDescriptor>` `getClasses()` Returns the list of classes in this packages without including subpackages.
`java.lang.String` `getName()`
`java.util.Collection<PackageDescriptor>` `getPackages()` Returns the list of subpackages.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_PKG

    public static final java.lang.String DEFAULT_PKG

See Also:
  Constant Field Values

### Constructor Detail

#### PackageDescriptor

    public PackageDescriptor(java.lang.String packageName,
                             java.lang.String longPackageName)

### Method Detail

#### from

    public static PackageDescriptor from(java.util.Map<java.lang.String,ClassDescriptor> codeModel)

Creates a package descriptor from a code model (mapping between class names and class descriptors).

#### getAllClassesByName

    public java.util.Map<java.lang.String,ClassDescriptor> getAllClassesByName()

Returns all classes in this package and its subpackages in a form of mapping between qualified class name and class descriptor.

#### addClass

    public void addClass(ClassDescriptor cls)

#### addPackage

    public void addPackage(PackageDescriptor pkg)

#### getClasses

    public java.util.Collection<ClassDescriptor> getClasses()

Returns the list of classes in this packages without including subpackages.

#### getName

    public java.lang.String getName()

#### getPackages

    public java.util.Collection<PackageDescriptor> getPackages()

Returns the list of subpackages.