Label labelAnnotation = annotatedType.getAnnotation(Label.class);
org.neo4j.graphdb.Label label = null;
IndexedPropertyMethodMetadata<?> indexedProperty = null;
if (labelAnnotation != null) {
label = DynamicLabel.label(labelAnnotation.value());
Class<?> usingIndexOf = labelAnnotation.usingIndexedPropertyOf();
if (!Object.class.equals(usingIndexOf)) {
indexedProperty = metadataByType.get(usingIndexOf).getIndexedProperty();
}
}
return new NodeMetadata(label, indexedProperty);