<p>
getInstance.
</p>

@param args a {@link java.lang.String} object.
@return a {@link com.obdobion.argument.input.IParserInput} object.
337854
static public IParserInput getInstance(final String... args)
    {
        final NamespaceParser parser = new NamespaceParser();
        parser.args = args;
        return parser;
    }
1212673
def getInstance(cls, *args):
        '''
        
        '''
        if not cls.__singleton:
            cls.__singleton = Config(*args)
        return cls.__singleton
31756
public static <T> InputReader getInstance(T input, int size, Charset cs, Set<ParserFeature> features) throws IOException
    {
        try
        {
            Class<?> inputClass = input.getClass();
            MethodHandle mh = inputMap.get(inputClass);
            if (mh != null)
            {
                return (InputReader) mh.invoke(input, size, cs, features);
            }
            else
            {
                for (Entry<Class<?>,MethodHandle> e : inputMap.entrySet())
                {
                    if (e.getKey().isAssignableFrom(inputClass))
                    {
                        mh = e.getValue();
                        break;
                    }
                }
                if (mh == null)
                {
                    throw new IOException(input+" not assignable to any of "+inputMap.keySet());
                }
            }
            return (InputReader) mh.invoke(input, size, cs, features);
        }
        catch (Throwable ex)
        {
            if (ex instanceof IOException)
            {
                throw (IOException)ex;
            }
            else
            {
                throw new IOException(ex);
            }
        }
    }
83636
@SuppressWarnings("unchecked")
	public <T> T createInstance(Object arg0, Method arg1, Object[] arg2, MethodProxy arg3) 
			throws FMSException {
		Object obj = null;
		Class<?> type = arg1.getReturnType();
		if (String.class.equals(type)) {
			obj = null;
		} else if (Integer.class.equals(type) || int.class.equals(type)) {
			obj = Integer.valueOf(0);
		} else if (Byte.class.equals(type) || byte.class.equals(type)) {
			obj = Integer.valueOf(0);
		} else if (java.util.Date.class.equals(type)) {
			obj = new Date();
		} else if (java.sql.Timestamp.class.equals(type)) {
			obj = new Timestamp(System.currentTimeMillis());
		} else if (java.sql.Date.class.equals(type)) {
			obj = new java.sql.Date(System.currentTimeMillis());
		} else if (java.sql.Time.class.equals(type)) {
			obj = new java.sql.Time(System.currentTimeMillis());
		} else if (Long.class.equals(type) || long.class.equals(type)) {
			obj = Long.valueOf(0);
		} else if (Short.class.equals(type) || short.class.equals(type)) {
			obj = Short.valueOf("0");
		} else if (Double.class.equals(type) || double.class.equals(type)) {
			obj = Double.valueOf(0);
		} else if (Float.class.equals(type) || float.class.equals(type)) {
			obj = Float.valueOf(0);
		} else if (BigInteger.class.equals(type)) {
			obj = BigInteger.valueOf(0);
		} else if (BigDecimal.class.equals(type)) {
			obj = BigDecimal.valueOf(0);
		} else if (Boolean.class.equals(type) || boolean.class.equals(type)) {
			obj = Boolean.TRUE;
		} else if (List.class.isAssignableFrom(type)) {
			try {
				Type t = arg1.getGenericReturnType();
				Object value = getObject(t);
				Object queryValue = GenerateQuery.createQueryEntity(value);
				obj = arg3.invokeSuper(arg0, arg2);
				((List<Object>) obj).add(queryValue);
			} catch (Throwable t) {
				throw new FMSException(t);
			}
		} else if (Enum.class.isAssignableFrom(type)) {
			LOG.debug("Create instance for Enum");
			// Create EnumObject
		} else if (type.isArray()) {
			// Create ArrayObject
			LOG.debug("Create instance for Array Object");
		} else if (!Modifier.isFinal(type.getModifiers())) {
			obj = GenerateQuery.createQueryEntity(type);
		} else {
			obj = null;
		}
		return (T) obj;
	}
1194832
public static <T> InputReader getInstance(T input) throws IOException
    {
        return getInstance(input, -1, UTF_8, NO_FEATURES);
    }
829801
public static Class[] getTypes(Object... args) {
      if (args.length == 0) {
         return new Class[0];
      }
      Class[] types = new Class[args.length];
      for (int i = 0; i < args.length; i++) {
         types[i] = args[i] == null ? Object.class : args[i].getClass();
      }
      return types;
   }
1226900
private static MessageBuffer newInstance(Constructor<?> constructor, Object... args)
    {
        try {
            // We need to use reflection to create MessageBuffer instances in order to prevent TypeProfile generation for getInt method. TypeProfile will be
            // generated to resolve one of the method references when two or more classes overrides the method.
            return (MessageBuffer) constructor.newInstance(args);
        }
        catch (InstantiationException e) {
            // should never happen
            throw new IllegalStateException(e);
        }
        catch (IllegalAccessException e) {
            // should never happen unless security manager restricts this reflection
            throw new IllegalStateException(e);
        }
        catch (InvocationTargetException e) {
            if (e.getCause() instanceof RuntimeException) {
                // underlying constructor may throw RuntimeException
                throw (RuntimeException) e.getCause();
            }
            else if (e.getCause() instanceof Error) {
                throw (Error) e.getCause();
            }
            // should never happen
            throw new IllegalStateException(e.getCause());
        }
    }
890159
public static PojoUtil getInstance() {

    if (instance == null) {
      PojoUtilImpl impl = null;
      synchronized (PojoUtilImpl.class) {
        if (instance == null) {
          impl = new PojoUtilImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
20042
public static Class<?>[] getTypes( Object[] args )
    {
        if ( args == null )
            return Reflect.ZERO_TYPES;

        Class<?>[] types = new Class[ args.length ];

        for( int i=0; i < args.length; i++ )
            types[i] = getType(args[i]);

        return types;
    }
77774
public Fachwert getFachwert(Class<? extends Fachwert> clazz, Object... args) {
        Class[] argTypes = toTypes(args);
        try {
            Constructor<? extends Fachwert> ctor = clazz.getConstructor(argTypes);
            return ctor.newInstance(args);
        } catch (ReflectiveOperationException ex) {
            Throwable cause = ex.getCause();
            if (cause instanceof ValidationException) {
                throw (ValidationException) cause;
            } else if (cause instanceof IllegalArgumentException) {
                throw new LocalizedValidationException(cause.getMessage(), cause);
            } else {
                throw new IllegalArgumentException("cannot create " + clazz + " with " + Arrays.toString(args), ex);
            }
        }
    }
977644
protected String getArguments(Object[] args) {

        if (args == null || args.length == 0) {
            return "";
        }

        StringBuilder sb = new StringBuilder();

        if (args.length == 1) {
            Object arg = args[0];
            String param = getSingleArgParameterAsString(arg);
            String displayParam = getSingleArgDisplayParameter(param);
            if (arg instanceof String) {
                sb.append("\"");
                sb.append(displayParam);
                sb.append("\"");
            } else {
                sb.append(displayParam);
            }
        } else {
            for (int i = 0; i < args.length; i++) {
                Object arg = args[i];
                boolean lastArg = i == args.length - 1;
                String param = getParameterAsString(arg);
                String displayParam = getDisplayParameter(param);
                if (arg instanceof String) {
                    sb.append("\"");
                    sb.append(displayParam);
                    sb.append("\"");
                } else {
                    sb.append(displayParam);
                }

                if (!lastArg) {
                    sb.append(",");
                }
            }
        }

        return sb.toString();
    }
533556
public static void main(final String[] args) {

        // describe all instances in aws-mock
        List<Instance> allInstances = describeAllInstances();
        for (Instance i : allInstances) {
            System.out.println(i.getInstanceId() + " - " + i.getState().getName());
        }

        // describe specifiled instances in aws-mock
        List<Instance> someInstances = describeInstances(Arrays.asList("i-12345678", "i=abcdef00"));
        for (Instance i : someInstances) {
            System.out.println(i.getInstanceId() + " - " + i.getState().getName());
        }
    }
1240197
public static ProcessUtil getInstance() {

    if (instance == null) {
      synchronized (ProcessUtilImpl.class) {
        if (instance == null) {
          ProcessUtilImpl util = new ProcessUtilImpl();
          util.initialize();
          instance = util;
        }
      }
    }
    return instance;
  }
849136
public static Arguments instance(Context context) {
        Arguments instance = context.get(argsKey);
        if (instance == null) {
            instance = new Arguments(context);
        }
        return instance;
    }
384563
public Object create(String name, Object... args)
    throws ClassNotFoundException,
           NoSuchMethodException,
           IllegalAccessException,
           InstantiationException,
           InvocationTargetException
    {
        try {
            return super.create(name, args);
        } catch (NoSuchMethodException x) {
            Class<?> type = Class.forName(name);
            Object singleton = _singleton.get(name);

            if (singleton != null) {
                return singleton;
            } else {
                Object[] burnedin = _arguments.get(type);
                if (burnedin != null) {
                    Object[] nargs = new Object[burnedin.length + args.length];
                    System.arraycopy(burnedin, 0, nargs, 0, burnedin.length);
                    System.arraycopy(args, 0, nargs, burnedin.length, args.length);
                    return Beans.create(type, nargs);
                } else {
                    throw x;
                }
            }
        }
    }
497311
public static void instanceOf(final Object arg, final Class<?> clazz, final String name) {
        
        if(arg == null) {
            throw new IllegalArgumentException(String.format("%s should not be null.", name));
        }
        
        if(!clazz.isAssignableFrom(arg.getClass())) {
            throw new IllegalArgumentException(String.format("%s should not be class with '%s'.", name, clazz.getName()));
        }
        
    }
1131564
public static ARouter getInstance() {
        if (!hasInit) {
            throw new InitException("ARouter::Init::Invoke init(context) first!");
        } else {
            if (instance == null) {
                synchronized (ARouter.class) {
                    if (instance == null) {
                        instance = new ARouter();
                    }
                }
            }
            return instance;
        }
    }