org.androidtransfuse.model
Class PackageClass

Package class diagram package PackageClass
java.lang.Object
  extended by org.androidtransfuse.model.PackageClass

public class PackageClass
extends Object

Class to deal with parsing and outputting class names including package and file extension.

Author:
John Ericksen

Constructor Summary
PackageClass(Class<?> inputClass)
          Constructor that parses the class package and name from the input class
PackageClass(String fullyQualifiedName)
          Constructor taking a fully qualified class name, including optional package and filename.
PackageClass(String pkg, String fileName)
          Constructor taking the package and file names.
 
Method Summary
 PackageClass append(String addName)
          Appends to the class name the given input
 boolean equals(Object obj)
           
 String getClassName()
          Builds and returns the name of the class represented by this builder
 String getFullyQualifiedName()
          Builds and returns the fully qualified class name represented by this class
 int hashCode()
           
 PackageClass replaceName(String replacement)
          Replaces the name of the current class with the given input.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PackageClass

public PackageClass(String fullyQualifiedName)
Constructor taking a fully qualified class name, including optional package and filename. This fully qualified name must not end with .java, as this will be interpreted as the class name.

Parameters:
fullyQualifiedName - class name

PackageClass

public PackageClass(String pkg,
                    String fileName)
Constructor taking the package and file names. This constructor defaults the output to not end with .java.

Parameters:
pkg - pacakge name
fileName - file name

PackageClass

public PackageClass(Class<?> inputClass)
Constructor that parses the class package and name from the input class

Parameters:
inputClass - input
Method Detail

getClassName

public String getClassName()
Builds and returns the name of the class represented by this builder

Returns:
class name

getFullyQualifiedName

public String getFullyQualifiedName()
Builds and returns the fully qualified class name represented by this class

Returns:
fully qualified class name

append

public PackageClass append(String addName)
Appends to the class name the given input

Parameters:
addName - input to be appended
Returns:
this for method chaining

replaceName

public PackageClass replaceName(String replacement)
Replaces the name of the current class with the given input.

Parameters:
replacement - input
Returns:
this for method chaining

toString

public String toString()
Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012. All Rights Reserved.