Maps the fields to the reflector to the descriptor.
170741
protected function mapReflectorToDescriptor(Method $reflector, MethodDescriptor $descriptor): void
    {
        $descriptor->setFullyQualifiedStructuralElementName($reflector->getFqsen());
        $descriptor->setName($reflector->getName());
        $descriptor->setVisibility((string) $reflector->getVisibility() ?: 'public');
        $descriptor->setFinal($reflector->isFinal());
        $descriptor->setAbstract($reflector->isAbstract());
        $descriptor->setStatic($reflector->isStatic());
        $descriptor->setLine($reflector->getLocation()->getLineNumber());
        $descriptor->setReturnType($reflector->getReturnType());
    }
615432
def copy_from(self, other):
        
        # Need to copy all attributes, fields, relations
        self.__attributes__ = {k: v.copy() for k, v in other.__attributes__.items()}
        self.__fields__ = {k: v.copy() for k, v in other.__fields__.items()}
        self.__relations__ = {k: v.copy() for k, v in other.__relations__.items()}
        self.maps = {k: m.copy() for k, m in other.maps.items()}
        self.dimensions = other.dimensions.copy()
1208605
void mapInField(Object from, String from_field, Object to, String to_in) {
        if (to == ca.getComponent()) {
            throw new ComponentException("wrong connect:" + from_field);
        }
        ComponentAccess ca_to = lookup(to);
        Access to_access = ca_to.input(to_in);
        checkFA(to_access, to, to_in);
        try {
            FieldContent.FA f = new FieldContent.FA(from, from_field);
            ca_to.setInput(to_in, new FieldObjectAccess(to_access, f, ens));
            if (log.isLoggable(Level.CONFIG)) {
                log.config(String.format("Field(%s) -> @In(%s)", f.toString(), to_access.toString()));
            }

        } catch (Exception E) {
            throw new ComponentException("No such field '" + from.getClass().getCanonicalName() + "." + from_field + "'");
        }
    }
634267
public <V> Reflecter<T> populate(Map<String, V> properties, List<String> excludes) {
		if (Decisions.isEmpty().apply(properties)) {
			return this;
		}
		
		if (this.delegate.get().getClass().isArray()) {
		    Object els = null;
		    
		    if (null != (els = properties.get(JSONer.ReadJSON.itemsF))) {
		        this.delegate = Optional.fromNullable(Resolves.<T>get(this.delegate.get().getClass(), els));
		    }
		    
		    return this;
		}
		
		if (this.autoExchange) {
			autoExchange();
		}
		
		fieldLoop(new TransformMap2ObjVal<V>(properties, excludes));
		this.isChanged = true;
		return this;
	}
189121
private Set<String> collectFields(Class clazz, String fieldPrefix, Set<String> fields) {
        Map<String, Class> fieldsAndClasses = getFieldsAndClasses(clazz, fieldPrefix);

        for (Map.Entry<String, Class> entry : fieldsAndClasses.entrySet()) {
            String field = entry.getKey();
            Class fieldClass = entry.getValue();

            if (DIRECTLY_PROJECTED_TYPES.contains(fieldClass) || Collection.class.isAssignableFrom(fieldClass)) {
                fields.add(field);
            } else {
                collectFields(fieldClass, field + ".", fields);
            }
        }

        return fields;
    }
282536
protected FieldDescriptor[] buildFieldsForSelect(ClassDescriptor cld)
    {
        DescriptorRepository repository = cld.getRepository();
        Set fields = new ListOrderedSet();   // keep the order of the fields
        
        // add Standard Fields
        // MBAIRD: if the object being queried on has multiple classes mapped to the table,
        // then we will get all the fields that are a unique set across all those classes so if we need to
        // we can materialize an extent
        FieldDescriptor fds[] = repository.getFieldDescriptorsForMultiMappedTable(cld);
        for (int i = 0; i < fds.length; i++)
        {
            fields.add(fds[i]);
        }

        // add inherited Fields. This is important when querying for a class having a super-reference
        fds = cld.getFieldDescriptor(true);
        for (int i = 0; i < fds.length; i++)
        {
            fields.add(fds[i]);
        }

        // add Fields of joined subclasses
        Class[] multiJoinedClasses = repository.getSubClassesMultipleJoinedTables(cld, true);
        for (int c = 0; c < multiJoinedClasses.length; c++)
        {
            ClassDescriptor subCld = repository.getDescriptorFor(multiJoinedClasses[c]);
            fds = subCld.getFieldDescriptions();
            for (int i = 0; i < fds.length; i++)
            {
                fields.add(fds[i]);
            }
        }

        FieldDescriptor[] result = new FieldDescriptor[fields.size()];
        fields.toArray(result);
        return result;
    }
542161
private void transformDescriptorIntrospectors(PrintWriter writer) {
		
    	
    	Map<String, RequestProbeTransformDescriptor> registeredTransformDescriptors =  RequestProbeBCIManagerImpl.getRequestProbeTransformDescriptors();
        List<String> transformDescriptorRefs = new ArrayList<String>() {{add("Transform Descriptor");  add("");}};
        List<String> tdDetails = new ArrayList<String>() {{add("ClassName.MethodName(Description)");  add("");}};
        List<Integer> indentationLength = new ArrayList<Integer>();
        int maxSpaceRequired = 0;
       
        for(Entry<String, RequestProbeTransformDescriptor> transformDescriptor : registeredTransformDescriptors.entrySet()) {
        	
        	transformDescriptorRefs.add(transformDescriptor.getValue().toString());
        	if(transformDescriptor.getValue().getMethodDesc().equals("all"))
        		 tdDetails.add(transformDescriptor.getValue().getClassName() + "." + transformDescriptor.getValue().getMethodName() + "("+ transformDescriptor.getValue().getMethodDesc() + ")" );
        	else
        		 tdDetails.add(transformDescriptor.getValue().getClassName() + "." + transformDescriptor.getValue().getMethodName() +  transformDescriptor.getValue().getMethodDesc() );
        }
        
        for(String transformDescriptorRef : transformDescriptorRefs) {
        	if(transformDescriptorRef.length() > maxSpaceRequired) {
        		maxSpaceRequired = transformDescriptorRef.length();
        	}
        }
        indentationLength.add(maxSpaceRequired+ EXTRA_SPACE_REQUIRED);

        writer.println();
        writer.println("------------------------------------------------------------------------------");
        writer.println("              Registered Transform Descriptors ");
        writer.println("------------------------------------------------------------------------------");
        
        for(int i = 0 ; i < transformDescriptorRefs.size(); i ++) {
        	writer.println(String.format("%-" + indentationLength.get(0) + "s%s",transformDescriptorRefs.get(i) ,tdDetails.get(i)));
        }
        
        if(registeredTransformDescriptors.size() ==  0) {
          	 writer.println("----- No transform descriptors are registered ----- ");
           }

	}
551807
def AdjustDescriptor(self, fields):
    """"""

    for f in fields:
      if f.name == "args_rdf_name":
        f.name = "payload_type"

      if f.name == "args":
        f.name = "payload"

    return fields
780428
public void copyFromPropertyDescriptor(EntityField other) {
        this.setter = other.setter;
        this.getter = other.getter;
        this.javaType = other.javaType;
        this.name = other.name;
    }
421972
def _update_fields_with_objects(self):
        
        # Update the photo target with photo objects
        if self.target is not None:
            if self.target_type == "photo":
                self.target = Photo(self._client, self.target)
            else:
                raise NotImplementedError("Actions can only be assigned to "
                                          "Photos")
1200233
public void fieldsToControls()
    {
        for (int iFileSeq = 0; ; iFileSeq++)
        {
            FieldList fieldList = this.getFieldList(iFileSeq);
            if (fieldList == null)
                break;
            for (int iFieldSeq = 0; ; iFieldSeq++)
            {
                Converter converter = fieldList.getField(iFieldSeq);
                if (converter == null)
                    break;
                FieldInfo field = converter.getField();
                field.displayField();   // This will move the data to all the screen components
            }
        }
    }
707308
function flattenFields(fields) {
	const fieldsObj = {};
	fields.forEach(function(field) {
		if (!fields.hasOwnProperty(field.name)) {
			fieldsObj[field.name] = field.value;
		}
	});
	return fieldsObj;
}
692747
def schema_map(schema):
    """"""
    mapper = {}
    for name in getFieldNames(schema):
        mapper[name] = name
    return mapper
517508
def _AddPropertiesForFields(descriptor, cls):
  """"""
  for field in descriptor.fields:
    _AddPropertiesForField(field, cls)

  if descriptor.is_extendable:
    # _ExtensionDict is just an adaptor with no state so we allocate a new one
    # every time it is accessed.
    cls.Extensions = property(lambda self: _ExtensionDict(self))
59169
protected function mapReflectorPropertiesOntoDescriptor(Function_ $reflector, FunctionDescriptor $descriptor): void
    {
        $packages = new Collection();
        $package = $this->extractPackageFromDocBlock($reflector->getDocBlock());
        //TODO: this looks like a potential bug. Have to investigate this!
        if ($package) {
            $tag = new TagDescriptor('package');
            $tag->setDescription($package);
            $packages->add($tag);
        }

        $descriptor->getTags()->set('package', $packages);

        $descriptor->setFullyQualifiedStructuralElementName($reflector->getFqsen());
        $descriptor->setName($reflector->getName());
        $descriptor->setLine($reflector->getLocation()->getLineNumber());
        $descriptor->setNamespace('\\' . trim(substr(
            (string) $reflector->getFqsen(),
            0,
            -strlen($reflector->getName()) - 2
        ), '\\'));
        $descriptor->setReturnType($reflector->getReturnType());
    }
1241133
private Map<String, Object> toFieldsMap(Map<String, DocumentField> fields) {
		Map<String, Object> result = new HashMap<>();
		for (Entry<String, DocumentField> entry : fields.entrySet()) {
			if (entry.getValue().getValues().size() > 1) {
				result.put(entry.getKey(), entry.getValue().getValues());
			} else {
				result.put(entry.getKey(), entry.getValue().getValue());
			}

		}
		return result;
	}
562814
protected function mapReflectorPropertiesOntoDescriptor($reflector, $descriptor)
    {
        $packages = new Collection();
        $package = $this->extractPackageFromDocBlock($reflector->getDocBlock());
        if ($package) {
            $tag = new TagDescriptor('package');
            $tag->setDescription($package);
            $packages->add($tag);
        }
        $descriptor->getTags()->set('package', $packages);

        $descriptor->setFullyQualifiedStructuralElementName($reflector->getName() . '()');
        $descriptor->setName($reflector->getShortName());
        $descriptor->setLine($reflector->getLinenumber());
        $descriptor->setNamespace($this->getFullyQualifiedNamespaceName($reflector));
    }