コード例 #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 create(final MemberOrder annotation, final FacetHolder holder) {
   return annotation == null
       ? null
       : new MemberOrderFacetAnnotation(annotation.name(), annotation.sequence(), holder);
 }