Add a class to this package.

@param sName
Name of class to be added to this package
@return Newly generated class
@exception JSNameAlreadyExistsException
When the specified class/interface was already created.
18922
@Nonnull
  public JSDefinedClass _class (@Nonnull @Nonempty final String sName) throws JSNameAlreadyExistsException
  {
    final JSDefinedClass aDefinedClass = new JSDefinedClass (sName);
    return addDeclaration (aDefinedClass);
  }
1051320
public void setClassname(final String className) {
    Object proc = null;
    try {
      final Class<?> implClass = ProjectDef.class.getClassLoader().loadClass(className);
      try {
        final Method getInstance = implClass.getMethod("getInstance");
        proc = getInstance.invoke(null);
      } catch (final Exception ex) {
        proc = implClass.newInstance();
      }
    } catch (final Exception ex) {
      throw new BuildException(ex);
    }
    this.projectWriter = (ProjectWriter) proc;
  }
903718
public Object newInstance(String className) {
        try {
            return classLoader.loadClass(className).newInstance();
        } catch (Exception e) {
            throw new ScalaInstanceNotFound(className);
        }
    }
929389
@Nonnull
  public JSVar var (@Nonnull @Nonempty final String sName) throws JSNameAlreadyExistsException
  {
    return var (sName, (IJSExpression) null);
  }
844241
public ISarlClassBuilder addSarlClass(String name) {
		ISarlClassBuilder builder = this.iSarlClassBuilderProvider.get();
		builder.eInit(getSarlBehavior(), name, getTypeResolutionContext());
		return builder;
	}
918763
@SuppressWarnings("unchecked")
    private Class<? extends T> loadClass(ClassLoader classLoader, String generatedName)
            throws ClassNotFoundException {
        return (Class<? extends T>) classLoader.loadClass(generatedName);
    }
282276
public ClassFile addInnerClass(String innerClassName, Class superClass) {
        return addInnerClass(innerClassName, superClass.getName());
    }
654432
@Nonnull
  public final HCSWFObject addObjectAttr (@Nonnull final String sName, final String sValue)
  {
    if (!JSMarshaller.isJSIdentifier (sName))
      throw new IllegalArgumentException ("The name '" + sName + "' is not a legal JS identifier!");

    if (m_aObjectAttrs == null)
      m_aObjectAttrs = new CommonsLinkedHashMap <> ();
    m_aObjectAttrs.put (sName, sValue);
    return this;
  }
286810
public Object newInstance( String name, Object... params ) throws ClassLoaderException {
        return newInstance( name, params, null );
    }
368096
public static Class loadClass(String className, String bundleName, String bundleVersion, Identification id) throws ClassException, BundleException {
	if (StringUtil.isEmpty(bundleName)) return loadClass(className);
	return loadClassByBundle(className, bundleName, bundleVersion, id);
    }
39661
@Nullable
  public static <DATATYPE> Class <DATATYPE> getClassFromNameSafe (@Nonnull final String sName)
  {
    try
    {
      return getClassFromName (sName);
    }
    catch (final ClassNotFoundException e)
    {
      return null;
    }
  }
165997
@Nonnull
  public JSVar param (@Nonnull @Nonempty final String sName)
  {
    final JSVar aVar = new JSVar (sName, null);
    m_aParams.add (aVar);
    return aVar;
  }
313577
public Element addClass(String className) {
        Validate.notNull(className);

        Set<String> classes = classNames();
        classes.add(className);
        classNames(classes);

        return this;
    }
340433
protected JClass loadClass(String name)
  {
    // JDK classes are not loaded, but javax are (e.g. for JSF)
    if (name.startsWith("java.") || name.startsWith("java/")) {
      return getStaticClassLoader().forName(name);
    }

    String classPath = name.replace('.', '/') + ".class";
    URL url = _loader.getResource(classPath);

    if (url != null) {
      JavaClass jClass = new JavaClass(this);
      jClass.setURL(url);

      jClass.setThisClass(name.replace('.', '/'));

      return jClass;
    }

    return null;
  }
912887
public ClassNode addInterface(String name) {
        ClassNode intf = infoBase.node(name);
        addInterface(intf);
        return this;
    }
318929
public void addName(String name)
   {
      if (names.contains(name))
      {
         throw new IllegalArgumentException("already contains: " + name);
      }
      indexes.add(name);
      names.add(name);
      dirty = true;
   }
557870
public PojoBuilder withName(String pojoPackage, String className) {
		if (!NamingHelper.isValidJavaClassName(className)) {
			className = NamingHelper.cleanNameForJava(className);
		}

		final String fullyQualifiedClassName = pojoPackage + "." + className;
		// Initiate package if necessary
		if (this.pojoPackage == null) {
			withPackage(pojoPackage);
		}

		// Builders should only have 1 active pojo under their responsibility
		if (this.pojo != null) {
			throw new IllegalStateException("Class already created");
		}

		try {
			// create the class
			logger.debug("Creating class {}", fullyQualifiedClassName);
			this.pojo = this.pojoModel._class(fullyQualifiedClassName);

			// Always add default constructor
			withDefaultConstructor(className);

			// Handle Serialization
			implementsSerializable();

			implementsGeneratedAnnotation();

			// Add to shortcuts
			this.codeModels.put(fullyQualifiedClassName, this.pojo);
		} catch (JClassAlreadyExistsException e) {
			// class already exists - reuse it!
			logger.debug("Enum {} already exists. Reusing it!", fullyQualifiedClassName);
			this.pojo = this.pojoModel._getClass(fullyQualifiedClassName);
		}
		return this;
	}