|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.roo.classpath.operations.ClasspathOperationsImpl
@Service public class ClasspathOperationsImpl
Provides convenience methods that can be used to create source code and install the JSR 303 validation API when required.
| Constructor Summary | |
|---|---|
ClasspathOperationsImpl()
|
|
| Method Summary | |
|---|---|
void |
addEnumConstant(String physicalTypeIdentifier,
org.springframework.roo.model.JavaSymbolName constantName)
|
void |
addField(FieldMetadata fieldMetadata)
Adds a new field to an existing class. |
void |
generateClassFile(ClassOrInterfaceTypeDetails details)
Creates a new class, with the location name name provided in the details. |
ClassOrInterfaceTypeDetails |
getClassOrInterface(org.springframework.roo.model.JavaType requiredClassOrInterface)
Obtains the requested JavaType, assuming it is a class or interface that exists at this time and can be parsed. |
String |
getPhysicalLocationCanonicalPath(org.springframework.roo.model.JavaType javaType,
org.springframework.roo.project.Path path)
|
String |
getPhysicalLocationCanonicalPath(String physicalTypeIdentifier)
|
ClassOrInterfaceTypeDetails |
getSuperclass(org.springframework.roo.model.JavaType superclass)
Obtains the superclass, if one is specified. |
boolean |
isPersistentClassAvailable()
|
boolean |
isProjectAvailable()
|
void |
newDod(org.springframework.roo.model.JavaType entity,
org.springframework.roo.model.JavaType name,
org.springframework.roo.project.Path path)
Creates a new data on demand provider for the entity. |
void |
newIntegrationTest(org.springframework.roo.model.JavaType entity)
Creates an integration test for the entity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClasspathOperationsImpl()
| Method Detail |
|---|
public boolean isProjectAvailable()
isProjectAvailable in interface ClasspathOperationspublic boolean isPersistentClassAvailable()
isPersistentClassAvailable in interface ClasspathOperations
public String getPhysicalLocationCanonicalPath(org.springframework.roo.model.JavaType javaType,
org.springframework.roo.project.Path path)
getPhysicalLocationCanonicalPath in interface ClasspathOperationspublic String getPhysicalLocationCanonicalPath(String physicalTypeIdentifier)
getPhysicalLocationCanonicalPath in interface ClasspathOperationspublic ClassOrInterfaceTypeDetails getSuperclass(org.springframework.roo.model.JavaType superclass)
ClasspathOperationsThrows an exception is a superclass was requested but could not be parsed or found.
getSuperclass in interface ClasspathOperationssuperclass - requested superclass (can be null)
public ClassOrInterfaceTypeDetails getClassOrInterface(org.springframework.roo.model.JavaType requiredClassOrInterface)
ClasspathOperationsJavaType, assuming it is a class or interface that exists at this time and can be parsed.
If these assumption are not met, an exception will be thrown.
getClassOrInterface in interface ClasspathOperationsrequiredClassOrInterface - that should be parsed (required)
public void generateClassFile(ClassOrInterfaceTypeDetails details)
ClasspathOperationsAn exception is thrown if the class already exists.
generateClassFile in interface ClasspathOperationsdetails - to create (required)
public void addEnumConstant(String physicalTypeIdentifier,
org.springframework.roo.model.JavaSymbolName constantName)
addEnumConstant in interface ClasspathOperationspublic void addField(FieldMetadata fieldMetadata)
ClasspathOperationsAn exception is thrown if the class does not exist, cannot be modified or a field with the requested name is already declared.
addField in interface ClasspathOperationsfieldMetadata - to add (required)public void newIntegrationTest(org.springframework.roo.model.JavaType entity)
ClasspathOperations
newIntegrationTest in interface ClasspathOperationsentity - to produce an integration test for (required)
public void newDod(org.springframework.roo.model.JavaType entity,
org.springframework.roo.model.JavaType name,
org.springframework.roo.project.Path path)
ClasspathOperations
newDod in interface ClasspathOperationsentity - to produce a data on demand provider for (required)name - the name of the new data on demand class (required)path - the location for the new data on demand class (required)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||