Returns instance of property finder. Instance is loaded as {@link java.util.ServiceLoader} service.
If no service is found, this method, this method will return <b>null</b>.

@return Instance of PropertyEditorFinder.
16278
public static PropertyEditorFinder getInstance(ClassLoader classLoader) {
        PropertyEditorFinder result = _INSTANCE;
        if (result == null) {
            synchronized (_LOCK) {
                result = _INSTANCE;
                if (result == null) {
                    init(classLoader);
                    result = _INSTANCE;
                }
            }
        }
        return result;
    }
866551
private boolean initPropertyService() {
        if (propertyService == null && appContext.containsBean("propertyService")) {
            propertyService = appContext.getBean("propertyService", IPropertyService.class);
        }
        
        return propertyService != null;
    }
376033
public <T> T getService(String serviceName) {
    T service = findService(serviceName, true);
    if (service == null) {
      throw new IllegalArgumentException(format("No service found named \"%s\"", serviceName));
    }

    return service;
  }
1323063
private static PropertyEditor findEditor(final Type type) {
    assert type != null;
    Class clazz = toClass(type);

    // try to locate this directly from the editor manager first.
    PropertyEditor editor = PropertyEditorManager.findEditor(clazz);

    // we're outta here if we got one.
    if (editor != null) {
      return editor;
    }


    // it's possible this was a request for an array class.  We might not
    // recognize the array type directly, but the component type might be
    // resolvable
    if (clazz.isArray() && !clazz.getComponentType().isArray()) {
      // do a recursive lookup on the base type
      editor = findEditor(clazz.getComponentType());
      // if we found a suitable editor for the base component type,
      // wrapper this in an array adaptor for real use
      if (editor != null) {
        return new ArrayConverter(clazz, editor);
      }
    }

    // nothing found
    return null;
  }
487612
public Converter getConverter() {

        if (this.converter != null) {
            return (this.converter);
        }
        return (Converter) getStateHelper().eval(PropertyKeys.converter);

    }
369732
static <T> Optional<T> findFirst(final Class<T> service) {
        final ServiceLoader<T> loader = load(service);
        if (loader == null) return empty();
        final Iterator<T> services = loader.iterator();
        return services.hasNext() ? of(services.next()) : empty();
    }
601403
public static DocumentFactory getInstance() {
      if (CONFIGURED_INSTANCE == null) {
         synchronized (DocumentFactory.class) {
            if (CONFIGURED_INSTANCE == null) {
               CONFIGURED_INSTANCE = new DocumentFactory();
            }
         }
      }
      return CONFIGURED_INSTANCE;
   }
1061082
public static PropertyManager getInstance() {
        if (instance == null) {
            try {
                initializePropertyManager();
            }
            catch (StartupException e) {
                // should not reach here, as the property manager should be
                // initialized by now
                throw new RuntimeException(e);
            }
            // container property manager will never hit this
        }
        return instance;
    }
41656
@Override
    public ClassLoader getClassLoader() {
        ClassLoader classLoader = this.initialClass.getClassLoader();
        if (classLoader == null) {
            classLoader = application.getClassLoader();
        }
        return classLoader;
    }
318883
public static ClassLoader getServiceClassLoader(String serviceUniqueName) {
        ClassLoader appClassLoader = SERVICE_CLASSLOADER_MAP.get(serviceUniqueName);
        if (appClassLoader == null) {
            return ClassLoaderUtils.getCurrentClassLoader();
        } else {
            return appClassLoader;
        }
    }
694790
@SuppressWarnings("unchecked")
   private <T> T loadService(Class<T> spiType, Class<?> defaultImpl, ClassLoader loader)
   {
      final String defaultImplName = defaultImpl != null ? defaultImpl.getName() : null;
      return (T)ServiceLoader.loadService(spiType.getName(), defaultImplName, loader);
   }
339161
@Override
    public ServiceReference<?> getServiceReference(String clazz) {
    	Collection<ServiceReference<?>> servrefs = serviceRegistrations.get(clazz);
    	if (servrefs == null || servrefs.size() == 0) {
            return null;
    	}

        return servrefs.iterator().next();
    }
444407
private PropertyEditor loadPropertyEditor(Class<?> clz) {
        PropertyEditor editor = null;
        try {
            editor = (PropertyEditor) clz.newInstance();
        } catch (InstantiationException e) {
            Logger.getLogger(PropertyEditorRegistry.class.getName()).log(Level.SEVERE, null, e);
        } catch (IllegalAccessException e) {
            Logger.getLogger(PropertyEditorRegistry.class.getName()).log(Level.SEVERE, null, e);
        }
        return editor;
    }
28711
public static ClassLoader getCurrentClassLoader() {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        if (cl == null) {
            cl = ClassLoaderUtils.class.getClassLoader();
        }
        return cl == null ? ClassLoader.getSystemClassLoader() : cl;
    }
488218
private static SerializerFactory getInstance() {
    if (instance == null) {
      String className = JacksonSerializerFactory.class.getName();
      try {
        className = System.getProperty(SERIALIZER_FACTORY_CLASS_NAME);
      } catch (Exception e) {
      }

      if (className != null) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        try {
          Class<?> clazz = loader.loadClass(className);
          instance = (SerializerFactory) clazz.newInstance();
        } catch (Exception e) {
          throw new IllegalArgumentException("Error instantiating serializer factory.");
        }
      } else {
        instance = new JacksonSerializerFactory();
      }
    }
    return instance;
  }
1341077
public PropertyDescriptor[] getPropertyDescriptors() {

        try {

            return new PropertyDescriptor[] {
                new PropertyDescriptor("name", MulticastReceiver.class),
                new PropertyDescriptor("address", MulticastReceiver.class),
                new PropertyDescriptor("port", MulticastReceiver.class),
                new PropertyDescriptor("threshold", MulticastReceiver.class),
                new PropertyDescriptor("decoder", MulticastReceiver.class),
                new PropertyDescriptor("advertiseViaMulticastDNS", MulticastReceiver.class),
            };
        } catch (Exception e) {
        }

        return null;
    }
754432
public EditorDescriptor getEditorDescriptor(Object editorObject) {
		Class editorClass = editorObject.getClass();
		EditorDescriptor descriptor = (EditorDescriptor)editorMap.get(editorClass);
		if(descriptor == null){
			Iterator it = editorMap.keySet().iterator();
			while(it.hasNext()){
				Class klass = (Class)it.next();
				if(klass.isAssignableFrom(editorClass)){
					descriptor = (EditorDescriptor)editorMap.get(klass);
				}
			}
		}
		return descriptor;
	}