| java.lang.Object org.acm.seguin.refactor.type.CreateClass
CreateClass | public class CreateClass (Code) | | This object creates a class from nothing. It is responsible for building
up the parse tree from scratch to create a new class.
author: Chris Seguin |
CreateClass | public CreateClass(TypeSummary existing, String className, boolean parent, String packageName)(Code) | | Constructor for the CreateClass object
Parameters: existing - The existing class we are building upon Parameters: className - The name of the new class Parameters: parent - Are we building a parent or child from the existingtype Parameters: packageName - the name of the package that the class is in |
CreateClass | public CreateClass(TypeSummary existing, String className, boolean parent)(Code) | | Constructor for the CreateClass object
Parameters: existing - The existing class we are building upon Parameters: className - The name of the new class Parameters: parent - Are we building a parent or child from the existing type |
CreateClass | CreateClass()(Code) | | Constructor for the CreateClass object
|
addImportStatement | boolean addImportStatement(TypeSummary parentSummary, ASTName parentName, ASTCompilationUnit root, int index)(Code) | | Adds the import statement and returns true if the import statement was
necessary
Parameters: parentSummary - the parent summary Parameters: parentName - the parent name Parameters: root - the tree being built true if the import statement was added |
createClassBody | ASTUnmodifiedClassDeclaration createClassBody(String parentName, ASTName grandparentName)(Code) | | Creates the body. The protection level is package so it can be easily
tested.
Parameters: parentName - Description of Parameter Parameters: grandparentName - Description of Parameter the class |
createModifiedClass | ASTClassDeclaration createModifiedClass(ASTName grandparentName)(Code) | | Creates the modified class
Parameters: grandparentName - The name of the parent class the modified class |
createPackageDeclaration | ASTPackageDeclaration createPackageDeclaration()(Code) | | Creates the package declaration
the package declaration |
createTypeDeclaration | ASTTypeDeclaration createTypeDeclaration(ASTName grandparentName)(Code) | | Creates the type declaration
Parameters: grandparentName - Description of Parameter the modified class |
getNameFromSummary | ASTName getNameFromSummary(TypeSummary summary)(Code) | | Converts the type summary into a name
Parameters: summary - the summary the name |
isSamePackage | boolean isSamePackage(String packageName, TypeSummary parentSummary)(Code) | | Gets the SamePackage attribute of the AddAbstractParent object
Parameters: parentSummary - Description of Parameter Parameters: packageName - Description of Parameter The SamePackage value |
print | File print(String name, SimpleNode root)(Code) | | Prints the file
Parameters: name - The name of the object Parameters: root - The root of the tree The file that the parse tree was written to |
setAbstract | public void setAbstract(boolean way)(Code) | | Sets the Abstract attribute of the CreateClass object
Parameters: way - The new Abstract value |
setFinal | public void setFinal(boolean way)(Code) | | Sets the Final attribute of the CreateClass object
Parameters: way - The new Final value |
setPackageName | public void setPackageName(String value)(Code) | | Sets the PackageName attribute of the CreateClass object
Parameters: value - The new PackageName value |
setScope | public void setScope(String value)(Code) | | Sets the Scope attribute of the CreateClass object
Parameters: value - The new Scope value |
|
|