Introspects the class and builds the metadata.
542390
private void process() {
    metadataBuilder = ConstructorMetadata.newBuilder().setClazz(clazz);
    MethodHandle mh = IntrospectionUtils.findDefaultConstructor(clazz);
    if (mh != null) {
      metadataBuilder.setConstructionStrategy(ConstructorMetadata.ConstructionStrategy.CLASSIC)
          .setConstructorMethodHandle(mh);
      // We have everything we need for the classic pattern with a default
      // constructor and accessor/mutator methods, more validations will
      // follow.
      return;
    }
    // Now we check for Builder pattern usage
    mh = findNewBuilderMethod(clazz);
    if (mh == null) {
      final String pattern = "Class %s requires a public no-arg constructor or a public static "
          + "method that returns a corresponding Builder instance. The name of the static method "
          + "can either be %s or %s";
      String error = String.format(pattern, clazz.getName(), METHOD_NAME_NEW_BUILDER,
          METHOD_NAME_BUILDER);
      throw new UnsupportedConstructionStrategyException(error);
    }
    Class<?> builderClass = mh.type().returnType();
    metadataBuilder.setConstructionStrategy(ConstructorMetadata.ConstructionStrategy.BUILDER)
        .setConstructorMethodHandle(mh).setBuilderClass(builderClass);
    MethodHandle buildMethodHandle = IntrospectionUtils.findInstanceMethod(builderClass,
        METHOD_NAME_BUILD, clazz);
    if (buildMethodHandle == null) {
      String pattern = "Class %s requires a public instance method, %s, with a return type of %s";
      throw new EntityManagerException(
          String.format(pattern, builderClass.getName(), METHOD_NAME_BUILD, clazz));
    }
    metadataBuilder.setBuildMethodHandle(buildMethodHandle);
  }
715329
def build_class(name, basenames=(), doc=None):
    """"""
    node = nodes.ClassDef(name, doc)
    for base in basenames:
        basenode = nodes.Name()
        basenode.name = base
        node.bases.append(basenode)
        basenode.parent = node
    return node
784265
def build_service_class(metadata):
    """"""
    i = importlib.import_module(metadata)
    service = i.service
    env = get_jinja_env()
    service_template = env.get_template('service.py.jinja2')
    with open(api_path(service.name.lower()), 'w') as t:
        t.write(service_template.render(service_md=service))
614649
@Override
  public DataWriter<Object> build() throws IOException {
    return new MetadataWriterWrapper<byte[]>(new SimpleDataWriter(this, this.destination.getProperties()),
        byte[].class,
        this.branches,
        this.branch,
        this.destination.getProperties());
  }
1220807
void introspectThisClassOnly(com.ibm.ws.rsadapter.FFDCLogger info) {
        info.createFFDCHeader(this);
        info.append("Connection:", AdapterUtil.toString(ivSqlConn));
        info.append("ManagedConnection:", ivManagedConnection);
    }
740126
private static EntityMetadata loadMetadata(Class<?> entityClass) {
    synchronized (entityClass) {
      EntityMetadata metadata = cache.get(entityClass);
      if (metadata == null) {
        EntityIntrospector introspector = new EntityIntrospector(entityClass);
        introspector.process();
        metadata = introspector.entityMetadata;
        cache.put(entityClass, metadata);
      }
      return metadata;
    }
  }
1240053
@Override
  public void introspect(ContextH3 context)
  {
    if (_infoRef.get() != null) {
      return;
    }

    _ctor = introspectConstructor();

    introspectFields();

    FieldInfoH3[] fieldInfo = new FieldInfoH3[2];

    fieldInfo[0] = _key.info();
    fieldInfo[1] = _value.info();

    _infoRef.compareAndSet(null, new ClassInfoH3(_type.getName(), fieldInfo));
  }
72811
@Override
	public void trainOnInstanceImpl(Instance inst)
	{
		// If this is the first instance, then initialize the forest.
		if(this.numInstances == 0)
		{
			this.buildForest(inst);
		}
		
		// Update the mass profile of every HSTree in the forest
		for(int i = 0 ; i < this.numTrees ; i++)
		{
			forest[i].updateMass(inst, referenceWindow);
		}
		
		if(this.numInstances > 50)
			referenceWindow = false;
		
		// If this is the last instance of the window, update every HSTree's model
		if(this.numInstances % windowSize == 0)
		{
			for(int i = 0 ; i < this.numTrees ; i++)
			{
				forest[i].updateModel();
			}
		}
		
		this.numInstances++;
	}
1197631
private void processProperties(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass) throws IntrospectionException, XMLStreamException
   {
      BeanInfo beanInfo = Introspector.getBeanInfo(aClass, aClass.getSuperclass());
      PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();

      for (int i = 0; i < propertyDescriptors.length; i++)
      {
         PropertyDescriptor propertyDescriptor = propertyDescriptors[i];
         if (propertyDescriptor.getPropertyType() != null)
         {
            String name = propertyDescriptor.getName();
            Method readMethod = propertyDescriptor.getReadMethod();
            Method writeMethod = propertyDescriptor.getWriteMethod();

            String readMethodName = readMethod == null ? null : readMethod.getName();
            String writeMethodName = writeMethod == null ? null : writeMethod.getName();
            addProperty(writer, name, propertyDescriptor.getPropertyType(), readMethodName, writeMethodName);

            if (readMethod != null)
            {
               methodSet.add(readMethod);
            }

            if (writeMethod != null)
            {
               methodSet.add(writeMethod);
            }
         }
         else
         {
            processAmbiguousProperty(writer, methodSet, aClass, propertyDescriptor);
         }
      }
   }
1013075
public function build()
    {
        $this->classMetadata->mergeExtension($this->getExtensionName(), [
            $this->key => $this->fieldName,
        ]);
    }
38755
def with_metaclass(meta, *bases):
    """"""

    class metaclass(meta):
        def __new__(cls, name, this_bases, d):
            return meta(name, bases, d)

    return type.__new__(metaclass, "temporary_class", (), {})
872227
protected function initialize()
    {
        $this->context = $this->environment->getContext();

        if ($this->hasFrozenCacheInProduction()) {
            $this->classReflectionData = $this->reflectionDataRuntimeCache->get('__classNames');
            $this->annotatedClasses = $this->reflectionDataRuntimeCache->get('__annotatedClasses');
            $this->loadFromClassSchemaRuntimeCache = true;
        } else {
            $this->loadClassReflectionCompiletimeCache();
        }

        $this->annotationReader = new AnnotationReader();
        foreach ($this->settings['ignoredTags'] as $tagName => $ignoreFlag) {
            if ($ignoreFlag === true) {
                AnnotationReader::addGlobalIgnoredName($tagName);
            }
        }

        $this->initialized = true;
    }
245428
public static ExternalListenerMetadata introspect(Class<?> listenerClass) {
    ExternalListenerMetadata cachedMetadata = cache.get(listenerClass);
    if (cachedMetadata != null) {
      return cachedMetadata;
    }
    synchronized (listenerClass) {
      cachedMetadata = cache.get(listenerClass);
      if (cachedMetadata != null) {
        return cachedMetadata;
      }
      ExternalListenerIntrospector introspector = new ExternalListenerIntrospector(listenerClass);
      introspector.introspect();
      cache.put(listenerClass, introspector.metadata);
      return introspector.metadata;
    }
  }
499968
public function build()
    {
        foreach ($this->events as $event => $listeners) {
            foreach ($listeners as $listener) {
                $this->builder->getClassMetadata()->addEntityListener($event, $listener['class'], $listener['method']);
            }
        }
    }
639292
private void introspectViaReflection() {
        {
            Class<?> memberClass = _member.getClass();
            if (memberClass.isArray()) {
                int length = Array.getLength(_member);
                Class<?> componentType = memberClass.getComponentType();
                if (componentType.isPrimitive()) {
                    addNewChild(componentType + "[0.." + (length - 1) + "]", _member);
                } else {
                    String simpleName = componentType.getSimpleName();
                    for (int i = 0; i < length && i < MAX_ARRAY_LENGTH; i++) {
                        Object value = Array.get(_member, i);
                        addNewChild(simpleName + "[" + i + "]", value);
                    }
                    if (length > MAX_ARRAY_LENGTH) {
                        addNewChild(simpleName + "[...]", "/* array length = " + length + " */");
                    }
                }
            } else {
                /*
                 * Loop around the fields of the object (including fields of its
                 * superclass) adding them as children (and, it we haven't seen
                 * the child before, getting introspected at the next level if
                 * its worth doing so)
                 */
                Class<?> currentClass = _member.getClass();
                while (currentClass != Object.class) {
                    Field[] fields = getFields(currentClass);
                    for (int i = 0; i < fields.length && i < MAX_ARRAY_LENGTH; i++) {
                        final Field field = fields[i];
                        Object value = getFieldValue(field);
                        addNewChild(field.getName(), value);
                    }
                    if (fields.length > MAX_ARRAY_LENGTH) {
                        addNewChild("field...", "/* total # of fields = " + fields.length + " */");
                    }
                    currentClass = currentClass.getSuperclass();
                }
            }
        }
    }
609668
private void buildAnnotatedInitBehaviour() {
		Method[] methods = this.getClass().getMethods();
		for (Method method : methods) {
			if (method.isAnnotationPresent(FbBotMillInit.class)) {
				try {
					method.invoke(this);
				} catch (Exception e) {
					logger.error(e.getMessage());
				}
			}
		}
	}
820254
def build(self, builder):
        """"""
        params = dict(StudyOID=self.study_oid,
                      MetaDataVersionOID=self.metadata_version_oid,
                      EffectiveDate=dt_to_iso8601(self.effective_date))
        builder.start("MetaDataVersionRef", params)
        builder.end("MetaDataVersionRef")