org.springframework.roo.classpath
Interface TypeManagementService

All Known Implementing Classes:
TypeManagementServiceImpl

public interface TypeManagementService

Creates and maintains types.

Since:
1.1.2
Author:
Alan Stewart

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. 
 

Method Detail

addEnumConstant

void addEnumConstant(String physicalTypeIdentifier,
                     org.springframework.roo.model.JavaSymbolName constantName)
Adds a new enum constant to an existing class.

Parameters:
physicalTypeIdentifier - to add (required)
constantName - the name of the constant (required)

addField

void addField(FieldMetadata field)
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.

Parameters:
field - the field to add (required)

createOrUpdateTypeOnDisk

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. This method expects the passed in file location to be correct.

Parameters:
cid - ClassOrInterfaceTypeDetails to base the file contents on (required)

generateClassFile

@Deprecated
void generateClassFile(ClassOrInterfaceTypeDetails cid)
Deprecated. 

Creates a new class, with the location name name provided in the details.

An exception is thrown if the class already exists.

Parameters:
cid - the ClassOrInterfaceTypeDetails to create (required)


Copyright © 2009–2015. All rights reserved.