Examples of NamingPolicy


Examples of ch.agent.crnickl.api.NamingPolicy

    return result;
  }
 
  @Override
  public Collection<String> getValues(String format) {
    NamingPolicy namingPolicy = getDatabase().getNamingPolicy();
    try {
      Map<T, String> map = getValueDescriptions();
      List<String> list = new ArrayList<String>(map.size());
      for (Map.Entry<T, String> e : map.entrySet()) {
        String value = toString(e.getKey());
        String descr = e.getValue();
        if (descr != null && descr.length() > 0) {
          if (format == null)
            value = namingPolicy.joinValueAndDescription(value, descr);
          else
            value = String.format(format, value, descr);
        }
        list.add(value);
      }
View Full Code Here

Examples of ch.agent.crnickl.api.NamingPolicy

   * @param name the name of the database
   */
  public DatabaseBackendImpl(String name) {
    topChronicle = new NameSpace(name, String.format("%s (%s)", getClass().getSimpleName(), name), new SurrogateImpl(this, DBObjectType.CHRONICLE, 0));
    setMessageListener(null);
    nm = new NamingPolicy();
    am = new HashMap<String, ValueAccessMethods<?>>();
  }
View Full Code Here

Examples of ch.agent.crnickl.api.NamingPolicy

   * @param name the name of the database
   */
  public DatabaseBackendImpl(String name) {
    topChronicle = new NameSpace(name, String.format("%s (%s)", getClass().getSimpleName(), name), new SurrogateImpl(this, DBObjectType.CHRONICLE, null));
    setMessageListener(null);
    nm = new NamingPolicy();
    am = new HashMap<String, ValueAccessMethods<?>>();
  }
View Full Code Here

Examples of ch.agent.crnickl.api.NamingPolicy

    return result;
  }
 
  @Override
  public Collection<String> getValues(String format) {
    NamingPolicy namingPolicy = getDatabase().getNamingPolicy();
    try {
      Map<T, String> map = getValueDescriptions();
      List<String> list = new ArrayList<String>(map.size());
      for (Map.Entry<T, String> e : map.entrySet()) {
        String value = toString(e.getKey());
        String descr = e.getValue();
        if (descr != null && descr.length() > 0) {
          if (format == null)
            value = namingPolicy.joinValueAndDescription(value, descr);
          else
            value = String.format(format, value, descr);
        }
        list.add(value);
      }
View Full Code Here

Examples of ch.agent.crnickl.api.NamingPolicy

   * @param name the name of the database
   */
  public DatabaseBackendImpl(String name) {
    topChronicle = new NameSpace(name, String.format("%s (%s)", getClass().getSimpleName(), name), new SurrogateImpl(this, DBObjectType.CHRONICLE, null));
    setMessageListener(null);
    nm = new NamingPolicy();
    am = new HashMap<String, ValueAccessMethods<?>>();
  }
View Full Code Here

Examples of net.sf.cglib.core.NamingPolicy

        return file;
    }

    private static byte[] createClass(final String name) {
        Enhancer enhancer = new Enhancer();
        enhancer.setNamingPolicy(new NamingPolicy() {
            public String getClassName(String prefix, String source, Object key, Predicate names) {
                return name;
            }
        });
        enhancer.setClassLoader(new URLClassLoader(new URL[0]));
View Full Code Here

Examples of net.sf.cglib.core.NamingPolicy

        return file;
    }

    private static byte[] createClass(final String name) {
        Enhancer enhancer = new Enhancer();
        enhancer.setNamingPolicy(new NamingPolicy() {
            public String getClassName(String prefix, String source, Object key, Predicate names) {
                return name;
            }
        });
        enhancer.setClassLoader(new URLClassLoader(new URL[0]));
View Full Code Here

Examples of net.sf.cglib.core.NamingPolicy

            enhancer.setInterfaces(new Class[] {iface});
            enhancer.setCallbackFilter(FILTER);
            enhancer.setCallbackTypes(new Class[] {NoOp.class, MethodInterceptor.class, FixedValue.class});
            enhancer.setUseFactory(false);
            enhancer.setClassLoader(classLoader);
            enhancer.setNamingPolicy(new NamingPolicy() {
                public String getClassName(String s, String s1, Object o, Predicate predicate) {
                    return name;
                }
            });
View Full Code Here

Examples of net.sf.cglib.core.NamingPolicy

            enhancer.setInterfaces(new Class[] {iface});
            enhancer.setCallbackFilter(FILTER);
            enhancer.setCallbackTypes(new Class[] {NoOp.class, MethodInterceptor.class, FixedValue.class});
            enhancer.setUseFactory(false);
            enhancer.setClassLoader(classLoader);
            enhancer.setNamingPolicy(new NamingPolicy() {
                public String getClassName(String s, String s1, Object o, Predicate predicate) {
                    return name;
                }
            });
View Full Code Here

Examples of net.sf.cglib.core.NamingPolicy

        return file;
    }

    private static byte[] createClass(final String name) {
        Enhancer enhancer = new Enhancer();
        enhancer.setNamingPolicy(new NamingPolicy() {
            public String getClassName(String prefix, String source, Object key, Predicate names) {
                return name;
            }
        });
        enhancer.setClassLoader(new URLClassLoader(new URL[0]));
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.