public String toString() { return format(); }
public String format( Object... args ) { return MessageFormat.format( rb.getString(name()), args ); } }
public Class getClassValue(Annotation a, String name) { try { return (Class)a.annotationType().getMethod(name).invoke(a); } catch (IllegalAccessException e) { // impossible throw new IllegalAccessError(e.getMessage()); } catch (InvocationTargetException e) { // impossible throw new InternalError(Messages.CLASS_NOT_FOUND.format(a.annotationType(), e.getMessage())); } catch (NoSuchMethodException e) { throw new NoSuchMethodError(e.getMessage()); } }
public String format( Object... args ) { return MessageFormat.format( rb.getString(name()), args ); } }
public final <A extends Annotation> A getMethodAnnotation(Class<A> annotation, M getter, M setter, Locatable srcPos) { A a1 = getter==null?null:getMethodAnnotation(annotation,getter,srcPos); A a2 = setter==null?null:getMethodAnnotation(annotation,setter,srcPos); if(a1==null) { if(a2==null) return null; else return a2; } else { if(a2==null) return a1; else { // both are present getErrorHandler().error(new IllegalAnnotationException( Messages.DUPLICATE_ANNOTATIONS.format( annotation.getName(), fullName(getter),fullName(setter)), a1, a2 )); // recover by ignoring one of them return a1; } } }
public String format( Object... args ) { return MessageFormat.format( rb.getString(name()), args ); } }
public String toString() { return format(); }
public String format( Object... args ) { return MessageFormat.format( rb.getString(name()), args ); } }
public Class getClassValue(Annotation a, String name) { try { return (Class)a.annotationType().getMethod(name).invoke(a); } catch (IllegalAccessException e) { // impossible throw new IllegalAccessError(e.getMessage()); } catch (InvocationTargetException e) { // impossible throw new InternalError(Messages.CLASS_NOT_FOUND.format(a.annotationType(), e.getMessage())); } catch (NoSuchMethodException e) { throw new NoSuchMethodError(e.getMessage()); } }
public final <A extends Annotation> A getMethodAnnotation(Class<A> annotation, M getter, M setter, Locatable srcPos) { A a1 = getter==null?null:getMethodAnnotation(annotation,getter,srcPos); A a2 = setter==null?null:getMethodAnnotation(annotation,setter,srcPos); if(a1==null) { if(a2==null) return null; else return a2; } else { if(a2==null) return a1; else { // both are present getErrorHandler().error(new IllegalAnnotationException( Messages.DUPLICATE_ANNOTATIONS.format( annotation.getName(), fullName(getter),fullName(setter)), a1, a2 )); // recover by ignoring one of them return a1; } } }
public String toString() { return format(); }
public String toString() { return format(); }
public Class getClassValue(Annotation a, String name) { try { return (Class)a.annotationType().getMethod(name).invoke(a); } catch (IllegalAccessException e) { // impossible throw new IllegalAccessError(e.getMessage()); } catch (InvocationTargetException e) { // impossible throw new InternalError(Messages.CLASS_NOT_FOUND.format(a.annotationType(), e.getMessage())); } catch (NoSuchMethodException e) { throw new NoSuchMethodError(e.getMessage()); } }
public Class getClassValue(Annotation a, String name) { try { return (Class)a.annotationType().getMethod(name).invoke(a); } catch (IllegalAccessException e) { // impossible throw new IllegalAccessError(e.getMessage()); } catch (InvocationTargetException e) { // impossible throw new InternalError(Messages.CLASS_NOT_FOUND.format(a.annotationType(), e.getMessage())); } catch (NoSuchMethodException e) { throw new NoSuchMethodError(e.getMessage()); } }
public final <A extends Annotation> A getMethodAnnotation(Class<A> annotation, M getter, M setter, Locatable srcPos) { A a1 = getter==null?null:getMethodAnnotation(annotation,getter,srcPos); A a2 = setter==null?null:getMethodAnnotation(annotation,setter,srcPos); if(a1==null) { if(a2==null) return null; else return a2; } else { if(a2==null) return a1; else { // both are present getErrorHandler().error(new IllegalAnnotationException( Messages.DUPLICATE_ANNOTATIONS.format( annotation.getName(), fullName(getter),fullName(setter)), a1, a2 )); // recover by ignoring one of them return a1; } } }
public final <A extends Annotation> A getMethodAnnotation(Class<A> annotation, M getter, M setter, Locatable srcPos) { A a1 = getter==null?null:getMethodAnnotation(annotation,getter,srcPos); A a2 = setter==null?null:getMethodAnnotation(annotation,setter,srcPos); if(a1==null) { if(a2==null) return null; else return a2; } else { if(a2==null) return a1; else { // both are present getErrorHandler().error(new IllegalAnnotationException( Messages.DUPLICATE_ANNOTATIONS.format( annotation.getName(), fullName(getter),fullName(setter)), a1, a2 )); // recover by ignoring one of them return a1; } } }