Spring Framework DefaultMessageCodesResolver - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework DefaultMessageCodesResolver class.

This code example shows how to use the following methods:
 
    /** 
     * Constructs a new ModelAwareErrorCodeConverter with {@link DefaultMessageCodesResolver} as the internal resolver. 
     */ 
    public ModelAwareMessageCodesResolver() { 
        this(new DefaultMessageCodesResolver());
    } 
 
    /** 
     * Constructs a new ModelAwareErrorCodeConverter with a given internal message codes resolver. 
     * 
     * @param internalResolver The internal message codes resolver to be used. 
     */ 
    public ModelAwareMessageCodesResolver(MessageCodesResolver internalResolver) {
        this.internalResolver = internalResolver;
    } 
 
    /** 
     * @see MessageCodesResolver#resolveMessageCodes(String, String) 
     */ 
4
CodeRank
This code example shows how to use the following methods:
    } 
 
    /** 
     * デフォルトコンストラクタです。 
     */ 
    public MessageCodesResolver() {} 
 
    /** 
     * {@inheritDoc} 
     */ 
    @Override 
    public String[] resolveMessageCodes(String errorCode, String objectName, String field, Class<?> fieldType) {
        List<String> codes = new LinkedList<String>();
        for (String suffix : DOMAIN_SUFFIXES) {
            String name = objectName + suffix;
            if (objectName.endsWith(suffix)) {
                name = objectName.replace(suffix, "");
            } 
            codes.add(postProcessMessageCode(Format.toDelimitedString(name, field)));
        } 
3
CodeRank