org.springframework.roo.model
Class JavaPackage

java.lang.Object
  extended by org.springframework.roo.model.JavaPackage
All Implemented Interfaces:
Comparable<JavaPackage>

public final class JavaPackage
extends Object
implements Comparable<JavaPackage>

Immutable representation of a Java package.

This class is used whenever a formal reference to a Java package is required.

Since:
1.0
Author:
Ben Alex

Constructor Summary
JavaPackage(String fullyQualifiedPackageName)
          Construct a JavaPackage.
 
Method Summary
 int compareTo(JavaPackage o)
           
 boolean equals(Object obj)
           
 String getFullyQualifiedPackageName()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaPackage

public JavaPackage(String fullyQualifiedPackageName)
Construct a JavaPackage.

The fully qualified package name will be enforced as follows:

Parameters:
fullyQualifiedPackageName - the name (as per the above rules; mandatory)
Method Detail

getFullyQualifiedPackageName

public String getFullyQualifiedPackageName()
Returns:
the fully qualified package name (complies with the rules specified in the constructor)

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

equals

public final boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public final int compareTo(JavaPackage o)
Specified by:
compareTo in interface Comparable<JavaPackage>

toString

public final String toString()
Overrides:
toString in class Object


Copyright © 2009-2010 VMware, Inc. All Rights Reserved.