org.springframework.roo.classpath
Class TypeManagementServiceImpl

java.lang.Object
  extended by org.springframework.roo.classpath.TypeManagementServiceImpl
All Implemented Interfaces:
TypeManagementService

@Service
public class TypeManagementServiceImpl
extends Object
implements TypeManagementService

Implementation of TypeManagementService.

Since:
1.1.2
Author:
Alan Stewart

Constructor Summary
TypeManagementServiceImpl()
           
 
Method Summary
 void addEnumConstant(String physicalTypeIdentifier, org.springframework.roo.model.JavaSymbolName constantName)
          Adds a new enum constant to an existing class.
 void addField(FieldMetadata field)
          Adds a new field to an existing class.
 void createOrUpdateTypeOnDisk(ClassOrInterfaceTypeDetails cid)
          Creates a physical type with the contents based on the ClassOrInterfaceTypeDetails passed in at the location denoted by the passed in path.
 void generateClassFile(ClassOrInterfaceTypeDetails cid)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeManagementServiceImpl

public TypeManagementServiceImpl()
Method Detail

addEnumConstant

public void addEnumConstant(String physicalTypeIdentifier,
                            org.springframework.roo.model.JavaSymbolName constantName)
Description copied from interface: TypeManagementService
Adds a new enum constant to an existing class.

Specified by:
addEnumConstant in interface TypeManagementService
Parameters:
physicalTypeIdentifier - to add (required)
constantName - the name of the constant (required)

addField

public void addField(FieldMetadata field)
Description copied from interface: TypeManagementService
Adds a new field to an existing class.

An exception is thrown if the class does not exist, cannot be modified or a field with the requested name is already declared.

Specified by:
addField in interface TypeManagementService
Parameters:
field - the field to add (required)

createOrUpdateTypeOnDisk

public void createOrUpdateTypeOnDisk(ClassOrInterfaceTypeDetails cid)
Description copied from interface: TypeManagementService
Creates a physical type with the contents based on the ClassOrInterfaceTypeDetails passed in at the location denoted by the passed in path. This method expects the passed in file location to be correct.

Specified by:
createOrUpdateTypeOnDisk in interface TypeManagementService
Parameters:
cid - ClassOrInterfaceTypeDetails to base the file contents on (required)

generateClassFile

@Deprecated
public void generateClassFile(ClassOrInterfaceTypeDetails cid)
Deprecated. 

Description copied from interface: TypeManagementService
Creates a new class, with the location name name provided in the details.

An exception is thrown if the class already exists.

Specified by:
generateClassFile in interface TypeManagementService
Parameters:
cid - the ClassOrInterfaceTypeDetails to create (required)


Copyright © 2009–2015. All rights reserved.