Examples of autoCreate()


Examples of org.ff4j.FF4j.autoCreate()

            if (ff4j.check("do-not-exit")) {}
        } catch (FeatureNotFoundException fnfe) {
            // System.out.println(fnfe.getMessage());
        }

        ff4j.autoCreate(true);
        // no more exception but returning false
        if (ff4j.check("do-not-exit")) {}

    }
View Full Code Here

Examples of org.ff4j.FF4j.autoCreate()

    @Test
    public void testInitConstructor3() {
        FF4j f3 = new FF4j();
        f3.setAuthorizationsManager(mock(AuthorizationsManager.class));
        f3.autoCreate(true);

        testingGeneratedFF4j(f3);
        Assert.assertNotNull(f3.getAuthorizationsManager());
    }
View Full Code Here

Examples of org.ff4j.FF4j.autoCreate()

    // enabling...

    @Test
    public void testEnableFeature() {
        FF4j ff4j = new FF4j();
        ff4j.autoCreate(true);
        ff4j.enable("newffff");
        Assert.assertTrue(ff4j.exist("newffff"));
        Assert.assertTrue(ff4j.check("newffff"));
    }
View Full Code Here

Examples of org.ff4j.FF4j.autoCreate()

    // disabling...

    @Test
    public void testDisableFeature() {
        FF4j ff4j = new FF4j();
        ff4j.autoCreate(true);
        ff4j.disable("newffff");
        Assert.assertTrue(ff4j.exist("newffff"));
        Assert.assertFalse(ff4j.check("newffff"));
    }
View Full Code Here

Examples of org.strecks.injection.annotation.InjectContextAttribute.autoCreate()

  public InjectionHandler createInjectionHandler(Annotation annotation, Class clazz, PropertyDescriptor propertyDescriptor)
  {
    InjectContextAttribute input = (InjectContextAttribute) annotation;
    String attributeName = AnnotationFactoryUtils.getAttributeName(propertyDescriptor.getName(), input.name());

    Class autoCreateClass = input.autoCreate() ? propertyDescriptor.getPropertyType() : null;

    ContextAttributeInjectionHandler handler = new ContextAttributeInjectionHandler(attributeName, autoCreateClass);
    return handler;

  }
View Full Code Here

Examples of org.strecks.injection.annotation.InjectRequestAttribute.autoCreate()

  public InjectionHandler createInjectionHandler(Annotation annotation, Class clazz, PropertyDescriptor propertyDescriptor)
  {
    InjectRequestAttribute input = (InjectRequestAttribute) annotation;
    String attributeName = AnnotationFactoryUtils.getAttributeName(propertyDescriptor.getName(), input.name());

    Class autoCreateClass = input.autoCreate() ? propertyDescriptor.getPropertyType() : null;

    RequestAttributeInjectionHandler handler = new RequestAttributeInjectionHandler(attributeName, autoCreateClass);
    return handler;

  }
View Full Code Here

Examples of org.strecks.injection.annotation.InjectSessionAttribute.autoCreate()

  {
    InjectSessionAttribute input = (InjectSessionAttribute) annotation;
    String attributeName = AnnotationFactoryUtils.getAttributeName(propertyDescriptor.getName(), input.name());
    boolean required = input.required();

    Class autoCreateClass = input.autoCreate() ? propertyDescriptor.getPropertyType() : null;

    SessionAttributeInjectionHandler handler = new SessionAttributeInjectionHandler(attributeName, autoCreateClass,
        required);
    return handler;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.