This method adds aClass with this global mapping and attributes to XML configuration file.<br>
It's mandatory define at least one attribute, global is optional instead.
@param aClass Class to adds
@param global global mapping
@return this instance
338498
public XML addClass(Class<?> aClass, Global global){
		checksClassAbsence(aClass);
		
		XmlClass xmlClass = new XmlClass();
		xmlClass.name = aClass.getName();
		xmlJmapper.classes.add(xmlClass);
		addGlobal(aClass, global);
		return this;
	}
1076630
public Global includedAttributes(LocalAttribute... includedAattributes){
		
		for (LocalAttribute attribute : includedAattributes)
			global.attributes.add(attribute.toXStream());
		
		return this;
	}
1037382
public static void xmlGlobalInexistent(Class<?> aClass) {
		throw new XmlMappingGlobalDoesNotExistException(MSG.INSTANCE.message(xmlMappingGlobalDoesNotExistException, aClass.getSimpleName()));
	}
844241
public ISarlClassBuilder addSarlClass(String name) {
		ISarlClassBuilder builder = this.iSarlClassBuilderProvider.get();
		builder.eInit(getSarlBehavior(), name, getTypeResolutionContext());
		return builder;
	}
166806
public XML fillMappedField(Class<?> configuredClass, MappedField configuredField) {
		
		Attribute attribute = getGlobalAttribute(configuredField, configuredClass);
		
		if(isNull(attribute))
			attribute = getAttribute(configuredField, configuredClass);
		
		if(!isNull(attribute)){
			if(isEmpty(configuredField.getMethod()))
				configuredField.getMethod(attribute.getGet());
			if(isEmpty(configuredField.setMethod()))
				configuredField.setMethod(attribute.getSet());
		}
		return this;
	}
1273142
public static TraceComponent register(Class<?> aClass, String group) {
        return register(aClass, group, null);
    }
367685
static JDBConnection createConnection(final String connectionName,
                                         final Config baseConfig,
                                         final Config globalPropertyConfig) throws InitializationException {

      Config connectionRef = ConfigFactory.load().getObject("acp.defaults.connection").toConfig();
      Config config = baseConfig.withFallback(connectionRef);

      final String user = getString(config, "user");

      final String password = getString(config, "password");
      final String testSQL = getString(config, "testSQL", "");
      String connectionString = getString(config, "connectionString");
      final boolean debug = getString(config, "debug", "false").equalsIgnoreCase("true");

      final long createTimeoutMillis = getMilliseconds(config, "createTimeout");
      final long testIntervalMillis = getMilliseconds(config, "testInterval");


      String propsRef = getString(config, "properties", "");
      Config propsConfig;
      if(propsRef.length() > 0) {
         if(globalPropertyConfig.hasPath(propsRef)) {
            propsConfig = globalPropertyConfig.getObject(propsRef).toConfig();
         } else {
            throw new InitializationException("The referenced global properties, '" + propsRef + "' is not defined");
         }

         connectionString = buildConnectionString(connectionString, propsConfig);
      }

      return new JDBConnection(connectionName, user, password, connectionString,
              createTimeoutMillis,
              testSQL.length() > 0 ? testSQL : null,
              testIntervalMillis, debug);
   }
524712
@Override
	public String getProperty(Class<?> aClass, String key)
	{
		return getProperty(new StringBuilder(aClass.getName()).append(".").append(key).toString());
	}
1315444
@Nonnull
  public static <T> UBL21ValidatorBuilder <T> create (@Nonnull final Class <T> aClass)
  {
    return new UBL21ValidatorBuilder <> (aClass);
  }
67056
public static String getProperty(Class<?> aClass, String key)
	{
		return getSettings().getProperty(aClass, key);
	}
789520
public static void bindGlobalModel(Class<?> entityClass, TableModel tableModel) {
		TableModelUtilsOfEntity.globalTableModelCache.put(entityClass, tableModel);
	}
1368431
public static <T> T newInstance(Class<?> aClass, Object... initargs) 
	throws SetupException
	{
		Class<?>[] parameterTypes = null;
		
		if(initargs != null && initargs.length > 0)
		{
			parameterTypes = new Class<?>[initargs.length];
			
			for (int i = 0; i < initargs.length; i++)
			{
				if(initargs[i] == null)
					continue; //skip
				
				parameterTypes[i] = initargs[i].getClass();
			}
		}
		
		return newInstance(aClass,parameterTypes,initargs);
	}
557243
@SuppressWarnings("unchecked")
	public static <T> T newInstance(Class<?> aClass) 
	{
		if(aClass == null)
			return null;
		
				try
				{
					if(String.class.equals(aClass))
					{
						return (T)"";
					}
					else if(Integer.class.equals(aClass))
					{
						return (T)Integer.valueOf(0);
					}
					else if(Date.class.equals(aClass))
					{
						return (T)Calendar.getInstance().getTime();
					}				
					else if(Long.class.equals(aClass) ||
							long.class.equals(aClass))
					{
						return (T)Long.valueOf(0);
					}		
					else if(Character.class.equals(aClass) ||
							char.class.equals(aClass) )
					{
						return (T) Character.valueOf('\0');
					}
					else if(Float.class.equals(aClass) ||
							float.class.equals(aClass))
					{
						return (T)Float.valueOf(0);
					}
					else if(Double.class.equals(aClass) || 
						   double.class.equals(aClass))
					{
						return (T)Double.valueOf(0);
					}				
					
					Constructor<T> constructor = (Constructor<T>)aClass.getDeclaredConstructor();
					
					
					return (T)constructor.newInstance();
					
				}
				catch(IllegalAccessException e)
				{
					throw new SetupException("Trying to create "+aClass.getName()+" "+e.getMessage());
				}
				catch(NoSuchMethodException | InvocationTargetException | InstantiationException e)
				{
						//Get constructor
						Constructor<?>[] constructors = aClass.getConstructors();
							
						int len = constructors.length;
						for(int i=0; i < len; i++)
						{
							Class<?>[] parameterTypes = constructors[i].getParameterTypes();
						    
							if(parameterTypes == null || parameterTypes.length == 0)
								throw new SetupException("Trying to create "+aClass.getName()+" "+e.getMessage()); //has a default constructor but not able to create it
							
							//Construct arguments
							Object[] initargs = new Object[parameterTypes.length];
							
							for(int argsIndex=0; argsIndex <  initargs.length;argsIndex++)
							{
								initargs[argsIndex] = newInstance(parameterTypes[argsIndex]);
							}
							
							try
							{
								return (T)constructors[i].newInstance(initargs);
							}
							catch(Exception exception)
							{}
						}//end for constructors
						
						//not able to success use another constructor
						throw new SetupException("Trying to create class with name:"+aClass.getName()+" ERROR:"+e.getMessage());	
					}//end catch
			}
505136
protected static void addClass2Component(UIComponent c, String aclass) {
		Map<String, Object> a = c.getAttributes();
		if (a.containsKey("styleClass")) {
			a.put("styleClass", a.get("styleClass") + " " + aclass);
		} else {
			a.put("styleClass", aclass);
		}
	}
131444
public XML addClass(Class<?> aClass,Attribute[] attributes){
		
		checksClassAbsence(aClass);
		
		XmlClass xmlClass = new XmlClass();
		xmlClass.name = aClass.getName();
		xmlClass.attributes = new ArrayList<XmlAttribute>();
		xmlJmapper.classes.add(xmlClass);
		
		addAttributes(aClass, attributes);
		
		return this;
	}
132784
@Nonnull
  public static <T> UBLTRWriterBuilder <T> create (@Nonnull final Class <T> aClass)
  {
    return new UBLTRWriterBuilder <> (aClass);
  }
1018110
public static <C extends Configurable> C getConfiguration(Class<C> klass) {
        String defaultPropertyFile = "datumbox." + klass.getSimpleName().toLowerCase(Locale.ENGLISH) + DEFAULT_POSTFIX + ".properties";

        Properties properties = new Properties();
        
        ClassLoader cl = klass.getClassLoader();
        
        //Load default properties from jar
        try (InputStream in = cl.getResourceAsStream(defaultPropertyFile)) {
            properties.load(in);
        }
        catch(IOException ex) {
            throw new UncheckedIOException(ex);
        }
        
        //Look for user defined properties
        String propertyFile = defaultPropertyFile.replaceFirst(DEFAULT_POSTFIX, "");
        if(cl.getResource(propertyFile)!=null) {
            //Override the default if they exist
            try (InputStream in = cl.getResourceAsStream(propertyFile)) {
                properties.load(in);
            }
            catch(IOException ex) {
                throw new UncheckedIOException(ex);
            }
            logger.trace("Loading properties file {}: {}", propertyFile, properties);
        }
        else {
            logger.warn("Using default properties file {}: {}", defaultPropertyFile, properties);
        }

        return getConfiguration(klass, properties);
    }