|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TypeLocationService
Locates types.
| Method Summary | |
|---|---|
Set<ClassOrInterfaceTypeDetails> |
findClassesOrInterfaceDetailsWithAnnotation(org.springframework.roo.model.JavaType... annotationsToDetect)
Returns a set of ClassOrInterfaceTypeDetailss that possess the
specified annotations (specified as a vararg). |
Set<ClassOrInterfaceTypeDetails> |
findClassesOrInterfaceDetailsWithTag(Object tag)
Returns a set of ClassOrInterfaceTypeDetailss that possess the
specified tag. |
Set<org.springframework.roo.model.JavaType> |
findTypesWithAnnotation(org.springframework.roo.model.JavaType... annotationsToDetect)
Returns a set of JavaTypes that possess the specified annotations
(specified as a vararg). |
Set<org.springframework.roo.model.JavaType> |
findTypesWithAnnotation(List<org.springframework.roo.model.JavaType> annotationsToDetect)
Returns a set of JavaTypes that possess the specified list of
annotations. |
String |
getPhysicalTypeCanonicalPath(org.springframework.roo.model.JavaType javaType,
org.springframework.roo.project.LogicalPath path)
Returns the canonical path that the given JavaType would have
within the given LogicalPath; this type need not exist. |
String |
getPhysicalTypeCanonicalPath(String physicalTypeId)
Returns the canonical path that a type with the given physical type id would have; this type need not exist. |
String |
getPhysicalTypeIdentifier(org.springframework.roo.model.JavaType javaType)
Looks for the given JavaType within the user project, and if
found, returns the id for its PhysicalTypeMetadata. |
String |
getPhysicalTypeIdentifier(String fileIdentifier)
Returns the physical type identifier for the Java source file with the given canonical path. |
List<String> |
getPotentialTopLevelPackagesForModule(org.springframework.roo.project.maven.Pom module)
|
String |
getTopLevelPackageForModule(org.springframework.roo.project.maven.Pom module)
|
ClassOrInterfaceTypeDetails |
getTypeDetails(org.springframework.roo.model.JavaType javaType)
Returns the details of the given Java type from within the user project. |
ClassOrInterfaceTypeDetails |
getTypeDetails(String physicalTypeId)
Resolves the ClassOrInterfaceTypeDetails to for the provided
physical type identifier. |
org.springframework.roo.project.LogicalPath |
getTypePath(org.springframework.roo.model.JavaType javaType)
Returns the LogicalPath containing the given JavaType. |
Collection<org.springframework.roo.model.JavaType> |
getTypesForModule(org.springframework.roo.project.maven.Pom module)
Returns the Java types that belong to the given module. |
Collection<String> |
getTypesForModule(String modulePath)
Deprecated. use getTypesForModule(Pom) instead; more strongly
typed and also ignores any types found in pom-packaged
modules |
boolean |
hasTypeChanged(String requestingClass,
org.springframework.roo.model.JavaType javaType)
Indicates whether the passed in type has changed since last invocation by the requesting class. |
boolean |
isInProject(org.springframework.roo.model.JavaType javaType)
Indicates whether the given type exists anywhere in the user project |
void |
processTypesWithAnnotation(List<org.springframework.roo.model.JavaType> annotationsToDetect,
LocatedTypeCallback callback)
Processes types with the specified list of annotations and uses the supplied callback implementation to process
the located types. |
| Method Detail |
|---|
Set<ClassOrInterfaceTypeDetails> findClassesOrInterfaceDetailsWithAnnotation(org.springframework.roo.model.JavaType... annotationsToDetect)
ClassOrInterfaceTypeDetailss that possess the
specified annotations (specified as a vararg).
annotationsToDetect - the annotations (as a vararg) to detect on a
type.
Set<ClassOrInterfaceTypeDetails> findClassesOrInterfaceDetailsWithTag(Object tag)
ClassOrInterfaceTypeDetailss that possess the
specified tag.
tag - the tag to detect on a type.
Set<org.springframework.roo.model.JavaType> findTypesWithAnnotation(org.springframework.roo.model.JavaType... annotationsToDetect)
JavaTypes that possess the specified annotations
(specified as a vararg).
annotationsToDetect - the annotations (as a vararg) to detect on a
type.
Set<org.springframework.roo.model.JavaType> findTypesWithAnnotation(List<org.springframework.roo.model.JavaType> annotationsToDetect)
JavaTypes that possess the specified list of
annotations.
annotationsToDetect - the list of annotations to detect on a type.
String getPhysicalTypeCanonicalPath(org.springframework.roo.model.JavaType javaType,
org.springframework.roo.project.LogicalPath path)
JavaType would have
within the given LogicalPath; this type need not exist.
Equivalent to constructing the physical type id from the given arguments
and calling getPhysicalTypeCanonicalPath(String).
javaType - the type's JavaType (required)path - the type's logical path
String getPhysicalTypeCanonicalPath(String physicalTypeId)
physicalTypeId - the physical type's metadata id (required)
String getPhysicalTypeIdentifier(org.springframework.roo.model.JavaType javaType)
JavaType within the user project, and if
found, returns the id for its PhysicalTypeMetadata. Use this
method if you know that the JavaType exists but don't know its
LogicalPath.
This method resolves the issue that a JavaType is location
independent, yet PhysicalTypeIdentifier instances are location
dependent (i.e. a PhysicalTypeIdentifier relates to a given
physical file, whereas a JavaType simply represents a type on the
classpath).
javaType - the type to locate (required)
PhysicalTypeIdentifier format) if found,
or null if not foundString getPhysicalTypeIdentifier(String fileIdentifier)
fileIdentifier - the path to the physical type (required)
nullList<String> getPotentialTopLevelPackagesForModule(org.springframework.roo.project.maven.Pom module)
module -
String getTopLevelPackageForModule(org.springframework.roo.project.maven.Pom module)
module -
ClassOrInterfaceTypeDetails getTypeDetails(org.springframework.roo.model.JavaType javaType)
javaType - the type to look for (required)
null if the type doesn't exist in the projectClassOrInterfaceTypeDetails getTypeDetails(String physicalTypeId)
ClassOrInterfaceTypeDetails to for the provided
physical type identifier. If the physical type identifier doesn't
represent a valid type an exception is thrown. This method will return
null if the ClassOrInterfaceTypeDetails can't be found.
physicalTypeId - the physical type metadata id (can be blank)
ClassOrInterfaceTypeDetails, or
null if the details can't be found (e.g. the given
ID is blank)org.springframework.roo.project.LogicalPath getTypePath(org.springframework.roo.model.JavaType javaType)
LogicalPath containing the given JavaType.
javaType - the JavaType for which to return the
LogicalPath
null if that type doesn't exist in the projectCollection<org.springframework.roo.model.JavaType> getTypesForModule(org.springframework.roo.project.maven.Pom module)
module -
null collection@Deprecated Collection<String> getTypesForModule(String modulePath)
getTypesForModule(Pom) instead; more strongly
typed and also ignores any types found in pom-packaged
modules
modulePath -
null collection of fully-qualified type names
boolean hasTypeChanged(String requestingClass,
org.springframework.roo.model.JavaType javaType)
requestingClass - the class requesting the changed typesjavaType - the type to lookup to see if a change has occurred
boolean isInProject(org.springframework.roo.model.JavaType javaType)
javaType - the type to check for (can be null)
false if a null type is given
void processTypesWithAnnotation(List<org.springframework.roo.model.JavaType> annotationsToDetect,
LocatedTypeCallback callback)
callback implementation to process
the located types.
annotationsToDetect - the list of annotations to detect on a type.callback - the LocatedTypeCallback to handle the processing
of the located type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||