Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.java.ao.atlassian;
 
import static com.google.common.base.Preconditions.*;
import static com.google.common.collect.Lists.*;
import static net.java.ao.atlassian.ConverterUtils.*;
    {
                new IgnoredFieldNameResolver(),
                new RelationalFieldNameResolver(),
                new TransformingFieldNameResolver(new MutatorFieldNameResolver()),
                new TransformingFieldNameResolver(new AccessorFieldNameResolver()),
                new TransformingFieldNameResolver(new PrimaryKeyFieldNameResolver()),
                new GetterFieldNameResolver(),
                new SetterFieldNameResolver(),
                new IsAFieldNameResolver(),
                new NullFieldNameResolver()
        ));
    }
    @Override
    public String getName(Method method)
    {
        final String name = .getName(method);
        return checkLength(name,
                "Invalid entity, generated field name (" + name + ") for method '" + method + "' is too long! " +
                        "It should be no longer than " +  + " chars.");
    }
    @Override
    public String getPolyTypeName(Method method)
    {
        final String name = .getPolyTypeName(method);
        return checkLength(name,
                "Invalid entity, generated field polymorphic type name (" + name + ") for method '" + method + "' is too long! " +
                        "It should be no longer than " +  + " chars.");
    }
    @Override
    public String convertName(String name)
    {
        return .convertName(name);
    }
    private static final class TransformingFieldNameResolver implements FieldNameResolver
    {
        private final FieldNameResolver delegate;
        public TransformingFieldNameResolver(FieldNameResolver delegate)
        {
            this. = checkNotNull(delegate);
        }
        @Override
        public boolean accept(Method method)
        {
            return .accept(method);
        }
        @Override
        public String resolve(Method method)
        {
            return .resolve(method);
        }
        @Override
        public boolean transform()
        {
            return true;
        }
    }
New to GrepCode? Check out our FAQ X