Add an inner class to this method.

@param innerClassName Optional short inner class name.
@param superClassName Full super class name.
181720
public ClassFile addInnerClass(String innerClassName, String superClassName) {
        ClassFile inner;
        if (innerClassName == null) {
            inner = mParent.addInnerClass(null, null, superClassName);
        } else {
            String fullInnerClassName = mParent.getClassName() + '$' +
                (++mAnonymousInnerClassCount) + innerClassName;
            inner = mParent.addInnerClass(fullInnerClassName, innerClassName, superClassName);
        }

        if (mParent.getMajorVersion() >= 49) {
            inner.addAttribute(new EnclosingMethodAttr
                               (mCp, mCp.addConstantClass(mParent.getClassName()),
                                mCp.addConstantNameAndType(mNameConstant, mDescriptorConstant)));
        }

        return inner;
    }
386544
public void setExtends(String superType) {
		if (!Strings.isEmpty(superType)
				&& !Event.class.getName().equals(superType)) {
			JvmParameterizedTypeReference superTypeRef = newTypeRef(this.sarlEvent, superType);
			JvmTypeReference baseTypeRef = findType(this.sarlEvent, Event.class.getCanonicalName());
			if (isSubTypeOf(this.sarlEvent, superTypeRef, baseTypeRef)) {
				this.sarlEvent.setExtends(superTypeRef);
				return;
			}
		}
		this.sarlEvent.setExtends(null);
	}
567692
protected void updateClasses(HashMap<String,List<Class>> list, String superclass, List<Class> classes) {
    if (!list.containsKey(superclass)) {
      list.put(superclass, classes);
    }
    else {
      for (Class cls : classes) {
        if (!list.get(superclass).contains(cls))
          list.get(superclass).add(cls);
      }
    }
  }
343859
public static void addGeneratedInnerClass(ClassNode cNode, ClassNode inner) {
        cNode.getModule().addClass(inner);
        markAsGenerated(cNode, inner);
    }
313577
public Element addClass(String className) {
        Validate.notNull(className);

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

        return this;
    }
678156
public function mergeSuperClassData($superClassName = NULL)
    {
        if (!$superClassName) {
            $superClassName = $this->superclass();
        }
        if ($superClassName) {
           $parent =& $this->_root->classNamed($superClassName);
           if ($parent->superclass()) { // merge parents superclass data first by recursing
               $this->mergeSuperClassData($parent->superclass());
           }
        }

        if (isset($parent)) {
            $phpdoctor = $this->_root->phpdoctor();

            // merge class tags array
            $tags =& $parent->tags();
            if ($tags) {
                foreach ($tags as $name => $tag) {
                    if (!isset($this->_tags[$name])) {
                        $phpdoctor->verbose('> Merging class '.$this->name().' with tags from parent '.$parent->name());
                        if (is_array($tag)) {
                            foreach ($tags[$name] as $key => $tag) {
                                $this->_tags[$name][$key] =& $tags[$name][$key];
                                $this->_tags[$name][$key]->setParent($this);
                            }
                        } else {
                            $this->_tags[$name] =& $tags[$name];
                            $this->_tags[$name]->setParent($this);
                        }
                    }
                }
            }

            // merge method data
            $methods =& $this->methods();
            foreach ($methods as $name => $method) {
                $parentMethod =& $parent->methodNamed($name);
                if ($parentMethod) {
                    // tags
                    $tags =& $parentMethod->tags();
                    if ($tags) {
                        foreach ($tags as $tagName => $tag) {
                            if (!isset($methods[$name]->_tags[$tagName])) {
                                $phpdoctor->verbose('> Merging method '.$this->name().':'.$name.' with tag '.$tagName.' from parent '.$parent->name().':'.$parentMethod->name());
                                if (is_array($tag)) {
                                    foreach ($tags[$tagName] as $key => $tag) {
                                        $methods[$name]->_tags[$tagName][$key] =& $tags[$tagName][$key];
                                        $methods[$name]->_tags[$tagName][$key]->setParent($this);
                                    }
                                } else {
                                    $methods[$name]->_tags[$tagName] =& $tags[$tagName];
                                    $methods[$name]->_tags[$tagName]->setParent($this);
                                }
                            }
                        }
                    }
                    // method parameters
                    foreach ($parentMethod->parameters() as $paramName => $param) {
                        if (isset($methods[$name]->_parameters[$paramName])) {
                            $type =& $methods[$name]->_parameters[$paramName]->type();
                        }
                        if (!isset($methods[$name]->_parameters[$paramName]) || $type->typeName() == 'mixed') {
                            $phpdoctor->verbose('> Merging method '.$this->name().':'.$name.' with parameter '.$paramName.' from parent '.$parent->name().':'.$parentMethod->name());
                            $paramType =& $param->type();
                            $methods[$name]->_parameters[$paramName] =& new fieldDoc($paramName, $methods[$name], $this->_root);
                            $methods[$name]->_parameters[$paramName]->set('type', new type($paramType->typeName(), $this->_root));
                        }
                    }
                    // method return type
                    if ($parentMethod->returnType() && $methods[$name]->_returnType->typeName() == 'void') {
                        $phpdoctor->verbose('> Merging method '.$this->name().':'.$name.' with return type from parent '.$parent->name().':'.$parentMethod->name());
                        $methods[$name]->_returnType = $parentMethod->returnType();
                    }
                    // method thrown exceptions
                    foreach ($parentMethod->thrownExceptions() as $exceptionName => $exception) {
                        if (!isset($methods[$name]->_throws[$exceptionName])) {
                            $phpdoctor->verbose('> Merging method '.$this->name().':'.$name.' with exception '.$exceptionName.' from parent '.$parent->name().':'.$parentMethod->name());
                            $methods[$name]->_throws[$exceptionName] =& $exception;
                        }
                    }
                }
            }

        }
    }
1136324
@Nonnull
    public BugInstance addClass(@SlashedClassName(when = When.UNKNOWN)  String className) {
        ClassAnnotation classAnnotation = new ClassAnnotation(ClassName.toDottedClassName(className));
        add(classAnnotation);
        return this;
    }
413885
public ClassFile addInnerClass(String fullInnerClassName, String innerClassName, 
                                   String superClassName) {
        if (fullInnerClassName == null) {
            if (innerClassName == null) {
                fullInnerClassName = mClassName + '$' + (++mAnonymousInnerClassCount);
            } else {
                fullInnerClassName = mClassName + '$' + innerClassName;
            }
        }

        ClassFile inner = new ClassFile(fullInnerClassName, superClassName);
        Modifiers modifiers = inner.getModifiers().toPrivate(true).toStatic(true);
        inner.setModifiers(modifiers);
        inner.mInnerClassName = innerClassName;
        inner.mOuterClass = this;

        if (mInnerClasses == null) {
            mInnerClasses = new ArrayList<ClassFile>();
        }

        mInnerClasses.add(inner);
        
        // Record the inner class in this, the outer class.
        if (mInnerClassesAttr == null) {
            addAttribute(new InnerClassesAttr(mCp));
        }

        // TODO: Anonymous inner classes and method scoped classes do not have
        // an outer class listed.

        mInnerClassesAttr.addInnerClass(fullInnerClassName, mClassName, 
                                        innerClassName, modifiers);

        // Record the inner class in itself.
        inner.addAttribute(new InnerClassesAttr(inner.getConstantPool()));
        inner.mInnerClassesAttr.addInnerClass(fullInnerClassName, mClassName,
                                              innerClassName, modifiers);

        return inner;
    }
909107
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            JavaClass cls = classContext.getJavaClass();
            JavaClass[] superClasses = cls.getSuperClasses();
            for (JavaClass superCls : superClasses) {
                if (tagClasses.contains(superCls.getClassName())) {
                    attributes = getAttributes(cls);

                    if (!attributes.isEmpty()) {
                        methodWrites = new HashMap<>();
                        fieldAnnotations = new HashMap<>();
                        super.visitClassContext(classContext);
                        reportBugs();
                    }
                    break;
                }
            }

        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            attributes = null;
            methodWrites = null;
            fieldAnnotations = null;
        }
    }
103982
def addClass(self, className):
        '''
            
        '''
        className = stripWordsOnly(className)

        if not className:
            return None

        if ' ' in className:
            # Multiple class names passed, do one at a time
            for oneClassName in className.split(' '):
                self.addClass(oneClassName)
            return

        myClassNames = self._classNames

        # Do not allow duplicates
        if className in myClassNames:
            return

        # Regenerate "classNames" and "class" attr.
        #   TODO: Maybe those should be properties?
        myClassNames.append(className)

        return None
175879
@Override
    public T addClass(String fullyQualifiedClassName) throws IllegalArgumentException {
        Validate.notNullOrEmpty(fullyQualifiedClassName, "Fully-qualified class name must be specified");

        // Get this archive's CLs
        Iterable<ClassLoader> cls = getArchiveClassLoaders();
        assert cls != null : "CLs of this archive is not specified:" + this.getArchive();

        // Find the class in the configured CLs
        final Class<?> classToAdd;
        try {
            classToAdd = ClassLoaderSearchUtilDelegator.findClassFromClassLoaders(fullyQualifiedClassName, cls);
        } catch (final ClassNotFoundException cnfe) {
            throw new IllegalArgumentException("Could not find the requested Class " + fullyQualifiedClassName
                + " in any of the configured ClassLoaders for this archive", cnfe);
        }

        // Add
        return addClass(classToAdd);
    }
706047
public void setExtends(String superType) {
		if (!Strings.isEmpty(superType)) {
			JvmParameterizedTypeReference superTypeRef = newTypeRef(this.container, superType);
			this.sarlClass.setExtends(superTypeRef);
			return;
		}
		this.sarlClass.setExtends(null);
	}
111387
public function addClass(string $className): void
    {
        if (!is_subclass_of($className, Provider::class, true)) {
            throw new InvalidClassException;
        }

        /** @var string[] $typeList */
        $typeList = $className::getPredefinedList();

        foreach ($typeList as $type) {
            if (isset($this->providerType[$type])) {
                throw new DuplicateSupportedTypeException;
            }
            $this->providerType[$type] = self::PROVIDER_CLASS;
            $this->classes[$type] = $className;
        }
    }
806041
protected void setInnerName(String innerName) {

        m_innerName = innerName;
        if (m_innerName != null) {
            m_typeName = createTypeName(innerName);
        }
    }
272141
function addClass(node, name) {
        if (hasClass(node, name)) {
            return;
        }
        if (node.classList) {
            node.classList.add(name);
        } else {
            node.className += " " + name;
        }
    }
919109
public void importClass(String name) throws ELException {
        int i = name.lastIndexOf('.');
        if (i <= 0) {
            throw new ELException(
                "The name " + name + " is not a full class name");
        }
        String className = name.substring(i+1);
        classNameMap.put(className, name);
    }
817000
public void setSimilarityClass(String className)
   {
      try
      {
         Class<?> similarityClass = ClassLoading.forName(className, this);
         similarity = (Similarity)similarityClass.newInstance();
      }
      catch (ClassNotFoundException e)
      {
         log.warn("Invalid Similarity class: " + className, e);
      }
      catch (InstantiationException e)
      {
         log.warn("Invalid Similarity class: " + className, e);
      }
      catch (IllegalAccessException e)
      {
         log.warn("Invalid Similarity class: " + className, e);
      }
   }