|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 ClasspathOperations
public boolean isPersistentClassAvailable()
isPersistentClassAvailable
in interface ClasspathOperations
public String getPhysicalLocationCanonicalPath(org.springframework.roo.model.JavaType javaType, org.springframework.roo.project.Path path)
getPhysicalLocationCanonicalPath
in interface ClasspathOperations
public String getPhysicalLocationCanonicalPath(String physicalTypeIdentifier)
getPhysicalLocationCanonicalPath
in interface ClasspathOperations
public ClassOrInterfaceTypeDetails getSuperclass(org.springframework.roo.model.JavaType superclass)
ClasspathOperations
Throws an exception is a superclass was requested but could not be parsed or found.
getSuperclass
in interface ClasspathOperations
superclass
- requested superclass (can be null)
public ClassOrInterfaceTypeDetails getClassOrInterface(org.springframework.roo.model.JavaType requiredClassOrInterface)
ClasspathOperations
JavaType
, 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 ClasspathOperations
requiredClassOrInterface
- that should be parsed (required)
public void generateClassFile(ClassOrInterfaceTypeDetails details)
ClasspathOperations
An exception is thrown if the class already exists.
generateClassFile
in interface ClasspathOperations
details
- to create (required)public void addEnumConstant(String physicalTypeIdentifier, org.springframework.roo.model.JavaSymbolName constantName)
addEnumConstant
in interface ClasspathOperations
public void addField(FieldMetadata fieldMetadata)
ClasspathOperations
An 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 ClasspathOperations
fieldMetadata
- to add (required)public void newIntegrationTest(org.springframework.roo.model.JavaType entity)
ClasspathOperations
newIntegrationTest
in interface ClasspathOperations
entity
- 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 ClasspathOperations
entity
- 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 |