Adds a class to be included when building the entity data model. This class must be annoted with one of the
annotations {@code EdmEntity}, {@code EdmComplex} or {@code EdmEnum}.

@param cls The class to be included in the entity data model.
508586
public AnnotationEntityDataModelFactory addClass(Class<?> cls) {
        EdmEntity entityAnnotation = cls.getAnnotation(EdmEntity.class);
        EdmComplex complexAnnotation = cls.getAnnotation(EdmComplex.class);
        EdmFunction functionAnnotation = cls.getAnnotation(EdmFunction.class);
        EdmFunctionImport functionImportAnnotation = cls.getAnnotation(EdmFunctionImport.class);
        EdmAction actionAnnotation = cls.getAnnotation(EdmAction.class);
        EdmActionImport actionImportAnnotation = cls.getAnnotation(EdmActionImport.class);
        EdmEnum enumAnnotation = cls.getAnnotation(EdmEnum.class);

        Set<Annotation> annotations = new HashSet<>();

        annotations.add(entityAnnotation);
        annotations.add(complexAnnotation);
        annotations.add(functionAnnotation);
        annotations.add(functionImportAnnotation);
        annotations.add(actionAnnotation);
        annotations.add(actionImportAnnotation);
        annotations.add(enumAnnotation);

        checkClassPrecondition(annotations, cls);

        if (entityAnnotation != null) {
            entityClasses.add(cls);
        } else if (complexAnnotation != null) {
            complexClasses.add(cls);
        } else if (functionAnnotation != null) {
            functionClasses.add(cls);
        } else if (functionImportAnnotation != null) {
            functionImportClasses.add(cls);
        } else if (actionAnnotation != null) {
            actionClasses.add(cls);
        } else if (actionImportAnnotation != null) {
            actionImportClasses.add(cls);
        } else if (enumAnnotation != null) {
            if (!cls.isEnum()) {
                throw new IllegalArgumentException("The EdmEnum annotation must only be used on enum classes: " +
                        cls.getName());
            }
            enumClasses.add(cls);
        }
        return this;
    }
300322
private static void buildClass(StringBuilder builder, Class cls) {
        int arrayDims = 0;
        Class tmp = cls;
        while (tmp.isArray()) {
            arrayDims++;
            tmp = tmp.getComponentType();
        }
        builder.append(tmp.getName());
        if (arrayDims > 0) {
            for (; arrayDims > 0 ; arrayDims--) {
                builder.append("[]");
            }
        }
    }
220816
public <T> void includeClass(Class<T> includeClass)
  {
    Objects.requireNonNull(includeClass);

    validateIncludeClass(includeClass);

    if (includeClass.isAnnotationPresent(Service.class)) {
      serviceClass(includeClass);
    }

    if (! includeIsActive(includeClass)) {
      throw new IllegalArgumentException(L.l("include class '{0}' is invalid because it does not define any beans, services, or paths.",
                                             includeClass.getName()));
    }
  }
1293315
public static AnnotationNode addAnnotationOrGetExisting(ClassNode classNode, Class<? extends Annotation> annotationClass, Map<String, Object> members) {
        ClassNode annotationClassNode = ClassHelper.make(annotationClass);
        return addAnnotationOrGetExisting(classNode, annotationClassNode, members);
    }
1295505
public final void add(@NotNull final SerializedDataType type, final Class<?> clasz) {
        Contract.requireArgNotNull("type", type);
        Contract.requireArgNotNull("clasz", clasz);
        map.put(type, clasz);
    }
438570
public static void registerXMLBindingClassForPropGetSetMethod(final Class<?> cls) {
        if (registeredXMLBindingClassList.containsKey(cls)) {
            return;
        }

        synchronized (entityDeclaredPropGetMethodPool) {
            registeredXMLBindingClassList.put(cls, false);

            if (entityDeclaredPropGetMethodPool.containsKey(cls)) {
                entityDeclaredPropGetMethodPool.remove(cls);
                entityDeclaredPropSetMethodPool.remove(cls);

                entityPropFieldPool.remove(cls);
                loadPropGetSetMethodList(cls);
            }
        }
    }
130884
public void addClass(ClassDescriptorDef classDef)
    {
        classDef.setOwner(this);
        // Regardless of the format of the class name, we're using the fully qualified format
        // This is safe because of the package & class naming constraints of the Java language
        _classDefs.put(classDef.getQualifiedName(), classDef);
    }
618670
private void addMode(CliMode mode, Class<?> annotatedClass) {

    CliModeContainer container = new CliModeContainer(mode, annotatedClass);
    addMode(container);
  }
343859
public static void addGeneratedInnerClass(ClassNode cNode, ClassNode inner) {
        cNode.getModule().addClass(inner);
        markAsGenerated(cNode, inner);
    }
1126383
@Override
  public void add(Object data, Class<?>... typeSpecs) {
    //    if (data == null) return;
    //
    //    typeSpecs = determineTypeSpecs(data, typeSpecs);
    //    if (this.getDefaultDataType() == null) this.setDefaultDataType(typeSpecs);
    //
    //    mReps.put(this.getSpecsAsString(typeSpecs), data);
    Representation representation = new Representation(data, typeSpecs);
    mReps.put(representation.getTypeSpecsString(), representation);
  }
452253
protected static void buildClassArgument(StringBuilder builder, Class cls) {
        buildClass(builder, cls);
        builder.append(".class");
    }
127437
public static Class<?> getGenClass(Class<?> cls) throws ParserException
    {
        GenClassname genClassname = cls.getAnnotation(GenClassname.class);
        if (genClassname == null)
        {
            throw new IllegalArgumentException("@GenClassname not set in "+cls);
        }
        try
        {
            return loadGenClass(cls);
        }
        catch (ClassNotFoundException ex)
        {
            throw new ParserException(cls+" classes implementation class not compiled.\n"+
                    "Possible problem with annotation processor.\n"+
                    "Try building the whole project and check that implementation class "+genClassname.value()+" exist!");
            /*
            try
            {
                GenClassCompiler pc = GenClassCompiler.compile(El.getTypeElement(cls.getCanonicalName()), null);
                return pc.loadDynamic();
            }
            catch (IOException ex1)
            {
                throw new ParserException(ex1);
            }
            */
        }
    }
1343517
private void catalogClass(JavaClass clz) {
        transactionalMethods = new HashMap<>();
        isEntity = false;
        hasId = false;
        hasGeneratedValue = false;
        hasEagerOneToMany = false;
        hasHCEquals = false;

        for (AnnotationEntry entry : clz.getAnnotationEntries()) {
            if ("Ljavax/persistence/Entity;".equals(entry.getAnnotationType())) {
                isEntity = true;
                break;
            }
        }

        for (Method m : clz.getMethods()) {
            catalogFieldOrMethod(m);

            if (("equals".equals(m.getName()) && SignatureBuilder.SIG_OBJECT_TO_BOOLEAN.equals(m.getSignature()))
                    || (Values.HASHCODE.equals(m.getName()) && SignatureBuilder.SIG_VOID_TO_INT.equals(m.getSignature()))) {
                hasHCEquals = true;
            }
        }

        for (Field f : clz.getFields()) {
            catalogFieldOrMethod(f);
        }
    }
26031
public void setEntryClasses(Class<?>... entryClasses) {
    int numEntries = entryClasses.length;
    HashMap<String, Class<?>> kindToEntryClassMap = this.kindToEntryClassMap;
    for (int i = 0; i < numEntries; i++) {
      Class<?> entryClass = entryClasses[i];
      ClassInfo typeInfo = ClassInfo.of(entryClass);
      Field field = typeInfo.getField("@gd:kind");
      if (field == null) {
        throw new IllegalArgumentException("missing @gd:kind field for " + entryClass.getName());
      }
      Object entry = Types.newInstance(entryClass);
      String kind = (String) FieldInfo.getFieldValue(field, entry);
      if (kind == null) {
        throw new IllegalArgumentException(
            "missing value for @gd:kind field in " + entryClass.getName());
      }
      kindToEntryClassMap.put(kind, entryClass);
    }
  }
1085593
public void addIgnoreFieldAnnotation( Class annotationClass ) {
      if( annotationClass != null && !ignoreFieldAnnotations.contains( annotationClass.getName() )) {
         ignoreFieldAnnotations.add(annotationClass.getName());
      }
   }
992125
def build_collections_and_classes
    @classes = Hash.new
    @class_metadata = Hash.new # This is used to store property information about a class

    # Build complex types first, these will be used for entities
    complex_types = @edmx.xpath("//edm:ComplexType", @ds_namespaces) || []
    complex_types.each do |c|
      name = qualify_class_name(c['Name'])
      props = c.xpath(".//edm:Property", @ds_namespaces)
      methods = props.collect { |p| p['Name'] } # Standard Properties
      @classes[name] = ClassBuilder.new(name, methods, [], self, @namespace).build unless @classes.keys.include?(name)
    end

    entity_types = @edmx.xpath("//edm:EntityType", @ds_namespaces)
    entity_types.each do |e|
      next if e['Abstract'] == "true"
      klass_name = qualify_class_name(e['Name'])
      methods = collect_properties(klass_name, e, @edmx)
      nav_props = collect_navigation_properties(klass_name, e, @edmx)
      @classes[klass_name] = ClassBuilder.new(klass_name, methods, nav_props, self, @namespace).build unless @classes.keys.include?(klass_name)
    end

    # Fill in the collections instance variable
    collections = @edmx.xpath("//edm:EntityContainer/edm:EntitySet", @ds_namespaces)
    collections.each do |c|
      entity_type = c["EntityType"]
      @collections[c["Name"]] = { :edmx_type => entity_type, :type => convert_to_local_type(entity_type) }
    end

    build_function_imports
  end
776377
public void addInclude(String strClassName, ClassProject.CodeType codeType)
    {
        try   {
            m_recClassInfo.getField(ClassInfo.CLASS_NAME).setString(strClassName);
            m_recClassInfo.setKeyArea(ClassInfo.CLASS_NAME_KEY);
            if ((m_recClassInfo.seek("=")) && (strClassName != null) && (strClassName.length() > 0))
            {   // If the based record class is in another file, include it!
                String strPackage = m_recClassInfo.getPackageName(codeType);
                this.addPackage(strPackage);
            }
            else if ((strClassName.indexOf("java.") != -1) || (strClassName.indexOf("javax.") != -1)) // If a java class is explicitly included, add it!
                this.addPackage(strClassName);
            else if ((strClassName.indexOf("com.") == 0) || (strClassName.indexOf("org.") == 0)) // If a java class is explicitly included, add it!
                this.addPackage(strClassName);
        } catch (DBException ex)   {
            ex.printStackTrace();
        }
    }