private IndexedPropertyMethodMetadata < ? > getIndexedPropertyMethodMetadata ( Collection < MethodMetadata < ? , ? > > methodMetadataOfType ) { for ( MethodMetadata methodMetadata : methodMetadataOfType ) { AnnotatedMethod annotatedMethod = methodMetadata . getAnnotatedMethod ( ) ; Annotation indexedAnnotation = annotatedMethod . getByMetaAnnotation ( IndexDefinition . class ) ; if ( indexedAnnotation != null ) { if ( ! ( methodMetadata instanceof PrimitivePropertyMethodMetadata ) ) { throw new XOException ( "Only primitive properties are allowed to be used for indexing." ) ; } return new IndexedPropertyMethodMetadata <> ( ( PropertyMethod ) annotatedMethod , ( PrimitivePropertyMethodMetadata ) methodMetadata , metadataFactory . createIndexedPropertyMetadata ( ( PropertyMethod ) annotatedMethod ) ) ; } } return null ; }
Determine the indexed property from a list of method metadata .