static

in src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java [442:468]


    static {
        final InvocationHandler handler = new InvocationHandler() {

            @Override
            public Object invoke(final Object obj, final Method calledMethod, final Object[] args) throws Throwable {
                if (calledMethod.getDeclaringClass().isAssignableFrom(ResourceResolverFactoryConfig.class)) {
                    return calledMethod.getDefaultValue();
                }
                if (calledMethod.getDeclaringClass() == Object.class) {
                    if (calledMethod.getName().equals("toString") && (args == null || args.length == 0)) {
                        return "Generated @" + ResourceResolverFactoryConfig.class.getName() + " instance";
                    }
                    if (calledMethod.getName().equals("hashCode") && (args == null || args.length == 0)) {
                        return this.hashCode();
                    }
                    if (calledMethod.getName().equals("equals") && args != null && args.length == 1) {
                        return Boolean.FALSE;
                    }
                }
                throw new InternalError("unexpected method dispatched: " + calledMethod);
            }
        };
        DEFAULT_CONFIG = (ResourceResolverFactoryConfig) Proxy.newProxyInstance(
                ResourceResolverFactoryConfig.class.getClassLoader(),
                new Class[] {ResourceResolverFactoryConfig.class},
                handler);
    }