org.springframework.roo.classpath.scanner
Class MemberDetailsImpl

java.lang.Object
  extended by org.springframework.roo.classpath.scanner.MemberDetailsImpl
All Implemented Interfaces:
MemberDetails

public class MemberDetailsImpl
extends Object
implements MemberDetails

Default implementation of MemberDetails.

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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAnnotation

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

Specified by:
getAnnotation in interface MemberDetails
Parameters:
type - the type of annotation to locate (required)
Returns:
the annotation, or null if not found

getConstructors

public List<ConstructorMetadata> getConstructors()
Description copied from interface: MemberDetails
Searches all MemberHoldingTypeDetails and returns all constructors.

Specified by:
getConstructors in interface MemberDetails
Returns:
zero or more constructors (never null)

getDetails

public List<MemberHoldingTypeDetails> getDetails()
Description copied from interface: MemberDetails
Returns an immutable representation of the member holders.

Specified by:
getDetails in interface MemberDetails
Returns:
a List of immutable member holders (never null or empty)

getDynamicFinderNames

public List<String> getDynamicFinderNames()
Description copied from interface: MemberDetails
Returns the names of this type's dynamic finders

Specified by:
getDynamicFinderNames in interface MemberDetails
Returns:
a non-null list

getFields

public List<FieldMetadata> getFields()
Description copied from interface: MemberDetails
Searches all MemberHoldingTypeDetails and returns all fields.

Specified by:
getFields in interface MemberDetails
Returns:
zero or more fields (never null)

getMethod

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

Specified by:
getMethod in interface MemberDetails
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

getMethod

public MethodMetadata getMethod(org.springframework.roo.model.JavaSymbolName methodName,
                                List<org.springframework.roo.model.JavaType> parameters)
Description copied from interface: MemberDetails
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.

Specified by:
getMethod in interface MemberDetails
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

getMethod

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

Specified by:
getMethod in interface MemberDetails
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

getMethods

public List<MethodMetadata> getMethods()
Description copied from interface: MemberDetails
Searches all MemberHoldingTypeDetails and returns all methods.

Specified by:
getMethods in interface MemberDetails
Returns:
zero or more methods (never null)

getMethodsWithTag

public List<MethodMetadata> getMethodsWithTag(Object tagKey)
Description copied from interface: MemberDetails
Searches all MemberDetails and returns all methods which contain a given CustomData tag.

Specified by:
getMethodsWithTag in interface MemberDetails
Parameters:
tagKey - the CustomData key to search for
Returns:
zero or more methods (never null)

getMostConcreteMethodWithTag

public MethodMetadata getMostConcreteMethodWithTag(Object tagKey)
Description copied from interface: MemberDetails
Determines the most concrete MemberHoldingTypeDetails in cases where multiple matches are found for a given tag.

Specified by:
getMostConcreteMethodWithTag in interface MemberDetails
Parameters:
tagKey - the CustomData key to search for (required)
Returns:
the most concrete tagged method or null if not found

getPersistentFieldTypes

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

Specified by:
getPersistentFieldTypes in interface MemberDetails
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

isMethodDeclaredByAnother

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

Specified by:
isMethodDeclaredByAnother in interface MemberDetails
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

isRequestingAnnotatedWith

public boolean isRequestingAnnotatedWith(AnnotationMetadata annotationMetadata,
                                         String requestingMid)
Description copied from interface: MemberDetails
Indicates whether the requesting MID is annotated with the specified annotation.

Specified by:
isRequestingAnnotatedWith in interface MemberDetails
Parameters:
annotationMetadata - the annotation to look for
requestingMid - the MID interested in
Returns:
see above


Copyright © 2009–2015. All rights reserved.