コード例 #1
0
 private MemberOrderFacet createFromAnnotationIfPossible(
     final ProcessMethodContext processMethodContext) {
   final MemberOrder annotation =
       Annotations.getAnnotation(processMethodContext.getMethod(), MemberOrder.class);
   if (annotation != null) {
     return new MemberOrderFacetAnnotation(
         annotation.name(),
         annotation.sequence(),
         servicesInjector.lookupService(TranslationService.class),
         processMethodContext.getFacetHolder());
   } else {
     return null;
   }
 }
コード例 #2
0
  private MemberOrderFacet createFromMetadataPropertiesIfPossible(
      final ProcessContextWithMetadataProperties<? extends FacetHolder> pcwmp) {

    final FacetHolder holder = pcwmp.getFacetHolder();

    final MemberOrderFacet memberOrderFacet;
    final Properties properties = pcwmp.metadataProperties("memberOrder");
    if (properties != null) {
      memberOrderFacet =
          new MemberOrderFacetProperties(
              properties, servicesInjector.lookupService(TranslationService.class), holder);
    } else {
      memberOrderFacet = null;
    }
    return memberOrderFacet;
  }