private NamedEntityGraphs getNamedEntityGraphs(Element tree, XMLContext.Default defaults) {
List<NamedEntityGraph> queries = buildNamedEntityGraph( tree, defaults );
if ( defaults.canUseJavaAnnotations() ) {
NamedEntityGraph annotation = getPhysicalAnnotation( NamedEntityGraph.class );
addNamedEntityGraphIfNeeded( annotation, queries );
NamedEntityGraphs annotations = getPhysicalAnnotation( NamedEntityGraphs.class );
if ( annotations != null ) {
for ( NamedEntityGraph current : annotations.value() ) {
addNamedEntityGraphIfNeeded( current, queries );
}
}
}
if ( queries.size() > 0 ) {