org.springframework.roo.classpath.scanner
Interface MemberDetails

All Known Implementing Classes:
MemberDetailsImpl

public interface MemberDetails

Immutable representation of member details scanned at a particular point in time.

Please note that MemberDetails as well as all types it eventually refers to are all immutable.

MemberDetails represents a convenient, customizable aggregation of member information at a particular point in time and for a particular MetadataProvider. It is distinct from other key types as follows:

Since:
1.1
Author:
Ben Alex

Method Summary
 AnnotationMetadata getAnnotation(org.springframework.roo.model.JavaType type)
          Locates the specified type-level annotation on any of the MemberHoldingTypeDetails in this MemberDetails.
 List<ConstructorMetadata> getConstructors()
          Searches all MemberHoldingTypeDetails and returns all constructors.
 List<MemberHoldingTypeDetails> getDetails()
          Returns an immutable representation of the member holders.
 List<String> getDynamicFinderNames()
          Returns the names of this type's dynamic finders
 List<FieldMetadata> getFields()
          Searches all MemberHoldingTypeDetails and returns all fields.
 MethodMetadata getMethod(org.springframework.roo.model.JavaSymbolName methodName)
          Locates a method with the name presented.
 MethodMetadata getMethod(org.springframework.roo.model.JavaSymbolName methodName, List<org.springframework.roo.model.JavaType> parameters)
          Locates a method with the name and parameter signature presented.
 MethodMetadata getMethod(org.springframework.roo.model.JavaSymbolName methodName, List<org.springframework.roo.model.JavaType> parameters, String excludingMid)
          Locates a method with the name and parameter signature presented that is not declared by the presented MID.
 List<MethodMetadata> getMethods()
          Searches all MemberHoldingTypeDetails and returns all methods.
 List<MethodMetadata> getMethodsWithTag(Object tagKey)
          Searches all MemberDetails and returns all methods which contain a given CustomData tag.
 MethodMetadata getMostConcreteMethodWithTag(Object tagKey)
          Determines the most concrete MemberHoldingTypeDetails in cases where multiple matches are found for a given tag.
 Set<org.springframework.roo.model.JavaType> getPersistentFieldTypes(org.springframework.roo.model.JavaType thisType, PersistenceMemberLocator persistenceMemberLocator)
          Returns the type of this class' persistent fields, including those in collections, but excluding: the ID field the version field JPA-transient fields immutable fields (i.e. that don't have both a getter and a setter) embedded ID fields the collection types themselves
 boolean isMethodDeclaredByAnother(org.springframework.roo.model.JavaSymbolName methodName, List<org.springframework.roo.model.JavaType> parameterTypes, String declaredByMetadataId)
          Indicates whether a method specified by the method attributes is present and isn't declared by the passed in MID.
 boolean isRequestingAnnotatedWith(AnnotationMetadata annotationMetadata, String requestingMid)
          Indicates whether the requesting MID is annotated with the specified annotation.
 

Method Detail

getAnnotation

AnnotationMetadata getAnnotation(org.springframework.roo.model.JavaType type)
Locates the specified type-level annotation on any of the MemberHoldingTypeDetails in this MemberDetails.

Parameters:
type - the type of annotation to locate (required)
Returns:
the annotation, or null if not found
Since:
1.2.0

getConstructors

List<ConstructorMetadata> getConstructors()
Searches all MemberHoldingTypeDetails and returns all constructors.

Returns:
zero or more constructors (never null)
Since:
1.2.0

getDetails

List<MemberHoldingTypeDetails> getDetails()
Returns an immutable representation of the member holders.

Returns:
a List of immutable member holders (never null or empty)

getDynamicFinderNames

List<String> getDynamicFinderNames()
Returns the names of this type's dynamic finders

Returns:
a non-null list
Since:
1.2.0

getFields

List<FieldMetadata> getFields()
Searches all MemberHoldingTypeDetails and returns all fields.

Returns:
zero or more fields (never null)

getMethod

MethodMetadata getMethod(org.springframework.roo.model.JavaSymbolName methodName)
Locates a method with the name presented. Searches all MemberDetails until the first such method is located or none can be found.

Parameters:
methodName - the method name to locate (can be null)
Returns:
the first located method, or null if the method name is null or such a method cannot be found
Since:
1.2.0

getMethod

MethodMetadata getMethod(org.springframework.roo.model.JavaSymbolName methodName,
                         List<org.springframework.roo.model.JavaType> parameters)
Locates a method with the name and parameter signature presented. Searches all MemberDetails until the first such method is located or none can be found.

Parameters:
methodName - the method name to locate (can be null)
parameters - the method parameter signature to locate (can be null if no parameters are required)
Returns:
the first located method, or null if the method name is null or such a method cannot be found
Since:
1.2.0

getMethod

MethodMetadata getMethod(org.springframework.roo.model.JavaSymbolName methodName,
                         List<org.springframework.roo.model.JavaType> parameters,
                         String excludingMid)
Locates a method with the name and parameter signature presented that is not declared by the presented MID.

Parameters:
methodName - the method name to locate (can be null)
parameters - the method parameter signature to locate (can be null if no parameters are required)
excludingMid - the MID that a found method cannot be declared by
Returns:
the first located method, or null if the method name is null or such a method cannot be found
Since:
1.2.0

getMethods

List<MethodMetadata> getMethods()
Searches all MemberHoldingTypeDetails and returns all methods.

Returns:
zero or more methods (never null)
Since:
1.2.0

getMethodsWithTag

List<MethodMetadata> getMethodsWithTag(Object tagKey)
Searches all MemberDetails and returns all methods which contain a given CustomData tag.

Parameters:
memberDetails - the MemberDetails to search (required)
tagKey - the CustomData key to search for
Returns:
zero or more methods (never null)
Since:
1.2.0

getMostConcreteMethodWithTag

MethodMetadata getMostConcreteMethodWithTag(Object tagKey)
Determines the most concrete MemberHoldingTypeDetails in cases where multiple matches are found for a given tag.

Parameters:
tagKey - the CustomData key to search for (required)
Returns:
the most concrete tagged method or null if not found
Since:
1.2.0

getPersistentFieldTypes

Set<org.springframework.roo.model.JavaType> getPersistentFieldTypes(org.springframework.roo.model.JavaType thisType,
                                                                    PersistenceMemberLocator persistenceMemberLocator)
Returns the type of this class' persistent fields, including those in collections, but excluding:

Parameters:
thisType - the owning Java type (required)
persistenceMemberLocator - for finding the ID and version fields (required)
Returns:
a non-null set with stable iteration order
Since:
1.2.0

isMethodDeclaredByAnother

boolean isMethodDeclaredByAnother(org.springframework.roo.model.JavaSymbolName methodName,
                                  List<org.springframework.roo.model.JavaType> parameterTypes,
                                  String declaredByMetadataId)
Indicates whether a method specified by the method attributes is present and isn't declared by the passed in MID.

Parameters:
methodName - the name of the method being searched for
parameterTypes - the parameters of the method being searched for
declaredByMetadataId - the MID to be used to see if a found method is declared by the MID
Returns:
see above
Since:
1.2.0

isRequestingAnnotatedWith

boolean isRequestingAnnotatedWith(AnnotationMetadata annotationMetadata,
                                  String requestingMid)
Indicates whether the requesting MID is annotated with the specified annotation.

Parameters:
annotationMetadata - the annotation to look for
requestingMid - the MID interested in
Returns:
see above
Since:
1.2.0


Copyright © 2009–2015. All rights reserved.