获取已解析的配置beans

@return array
<pre>
[
'beanName' => ObjectDefinition,
...
]
</pre>
775788
public function getDefinitions()
    {
        $definitions = [];
        foreach ($this->definitions as $beanName => $definition) {
            $definitions[$beanName] = $this->resolvedefinitation($beanName, $definition);
        }

        return $definitions;
    }
446815
private EJBKey[] getEJBKeys(BeanO[] beans)
    {
        EJBKey result[] = null;
        if (beans != null) {
            result = new EJBKey[beans.length];
            for (int i = 0; i < beans.length; ++i) {
                result[i] = beans[i].getId();
            }
        }
        return result;
    }
15519
public function getDefAsArray()
    {
        return [
            'length'                => $this->definition->getLength(),
            'title'                 => $this->definition->getTitle(),
            'description'           => $this->definition->getDescription(),
            'readOnly'              => $this->definition->getReadOnly(),
            'hidden'                => $this->definition->getHidden(),
            'recordOriginException' => $this->definition->isRecordOriginException(),
            'required'              => $this->definition->getRequired(),
            'searchable'            => $this->definition->getSearchable(),
            'translatable'          => $this->definition->getTranslatable(),
            'collection'            => $this->definition->getCollection(),
            'groups'                => $this->definition->getGroups(),
            'restrictions'          => $this->definition->getRestrictions(),
            'onVariation'           => $this->definition->getOnVariation(),

            'name'                  => $this->getName(),
            'type'                  => $this->getType(),
            'exposedName'           => $this->getExposedName(),
            'doctrineType'          => $this->getTypeDoctrine(),
            'serializerType'        => $this->getTypeSerializer(),
            'xDynamicKey'           => $this->getXDynamicKey(),
            'relType'               => null,
            'isClassType'           => false,
            'constraints'           => array_map(
                [Utils\ConstraintNormalizer::class, 'normalize'],
                $this->definition->getConstraints()
            ),
        ];
    }
1098159
public static void dumpBeansNames() {
		DefaultListableBeanFactory f = (DefaultListableBeanFactory) context.getBeanFactory();
		String[] beanDefinitionNames = f.getBeanDefinitionNames();
		for (String name : beanDefinitionNames) {
			JK.print(name, " for class :", f.getBean(name).getClass().getName());
		}
	}
306728
public function getFieldTypes()
    {
        $fields = [];
        foreach ($this->fields as $name => $value) {
            $fields[$name] = isset($this->types[$name])
                ? $this->types[$name]
                : null
                ;
        }

        return $fields;
    }
1247592
public static function GetDefaultPropertysGreedy () {
		$result = [];

		//開始地点
		$reflection_class = new \ReflectionClass(static::class);
		$namespace = $reflection_class->getNamespaceName();
		$class_name = $reflection_class->getShortName();

		$result[$namespace] = [];
		$result[$namespace][$class_name] = [];
		foreach ($reflection_class->getDefaultProperties() as $key => $value) {
			$result[$namespace][$class_name] = new \ReflectionProperty($reflection_class->getName(), $key);
		}

		while ($reflection_class = $reflection_class->getParentClass()) {
			$namespace = $reflection_class->getNamespaceName();
			$class_name = $reflection_class->getShortName();

			if (!isset($result[$namespace])) {
				$result[$namespace] = [];
			}
			if (!isset($result[$namespace][$class_name])) {
				$result[$namespace][$class_name] = [];
			}

			foreach ($reflection_class->getDefaultProperties() as $key => $value) {
				$result[$namespace][$class_name] = new \ReflectionProperty($reflection_class->getName(), $key);
			}
		}

		return $result;
	}
1154719
private BeanO[] getBeanOs()
    {
        BeanO result[];
        result = new BeanO[ivBeanOs.size()];
        Iterator<BeanO> iter = ivBeanOs.values().iterator();
        int i = 0;
        while (iter.hasNext()) {
            result[i++] = iter.next();
        }
        return result;
    }
505926
protected function fields()
    {
        return [
            $this->newField('name', 'string')->label('内部编号')
                ->inList()->required()->factory($this->faker->unique()),
            $this->newField('value', 'json')->label('取值')
                ->inList()->defaultValue('""')->required()
                ->factory($this->faker->realText()),
            $this->newField('type', 'string')->label('类型')
                ->inList()->defaultValue('system')
                ->validations('in:system,settable')
                ->factory($this->faker->randomElement(['system', 'settable'])),
            $this->newField('settable_id', 'integer')->label('可配置对象ID')
                ->nullable(),
            $this->newField('settable_type', 'string')->label('可配置对象类型')
                ->nullable()
        ];
    }
802285
private function parseFields() {
        $this->_fields   = [];
        $refobj          = new \ReflectionObject($this);
        $dann            = new Annotation($refobj);
        $this->_xssClean = $dann->getBool('xssclean', true);
        unset($dann);
        $fields  = $refobj->getProperties(\ReflectionProperty::IS_PUBLIC);
        $sfields = [];
        if (!empty($fields)) {
            /**@var  \ReflectionProperty $field */
            foreach ($fields as $field) {
                $ann = new Annotation($field);
                if ($ann->has('type')) {
                    //表单名
                    $fname = $field->getName();
                    $fd    = $this->addField($fname, $ann, $this->{$fname});
                    if ($fd) {
                        $sfields[] = $fd;
                    }
                }
            }
        }
        if (method_exists($this, 'initialize')) {
            $this->initialize($sfields);
        }
        if ($sfields) {
            $this->defaultQueryFields = implode(',', $sfields);
        }
        fire(get_class($this) . '::onParseFields', $this);
        unset($refobj);
    }
854857
public function getDefAsArray()
    {
        return array_replace(
            $this->element->getDefAsArray(),
            [
                'name'              => $this->getName(),
                'type'              => $this->getType(),
                'doctrineType'      => $this->getTypeDoctrine(),
                'serializerType'    => $this->getTypeSerializer()
            ],
            $this->getHashAnonymousHashRequired()
        );
    }
772354
public function resolvedefinitation(string $beanName, array $definition)
    {
        if (!isset($definition['class'])) {
            throw new \InvalidArgumentException("definitions of bean 初始化失败，class字段没有配置,Data=" . json_encode($definition));
        }

        $className = $definition['class'];
        unset($definition['class']);

        // 初始化
        $objDefinitation = new ObjectDefinition();
        $objDefinitation->setName($beanName);
        $objDefinitation->setClassName($className);

        // 解析属性和构造函数
        list($propertyInjections, $constructorInjection) = $this->resolverPropertiesAndConstructor($definition);

        // 设置属性和构造函数
        $objDefinitation->setPropertyInjections($propertyInjections);
        if ($constructorInjection != null) {
            $objDefinitation->setConstructorInjection($constructorInjection);
        }

        return $objDefinitation;
    }
314107
public Collection<String> listAttributeNames() {
        List<String> list = new ArrayList<String>();
        try {
            MBeanAttributeInfo[] attrs = beanInfo.getAttributes();
            for (MBeanAttributeInfo attr : attrs) {
                list.add(attr.getName());
            }
        } catch (Exception e) {
            throwException("Could not list attribute names. Reason: ", e);
        }
        return list;
    }
567158
public static function getFromDB( )
    {
        $result = array();
        $objDB = \Database::getInstance( );

        $tables = $objDB->listTables( null, true );
        if( empty($tables) ) {
            return $result;
        }

        foreach( $tables as $table ) {
            $keys = array();
            $fields = $objDB->listFields($table, true);

            foreach( $fields as $field ) {
                $name = $field['name'];
                $field['name'] = '`' . $field['name'] . '`';

                if( in_array(strtolower($field['type']), array('text', 'tinytext', 'mediumtext', 'longtext')) && isset($fields[$name]) ) {
                    $keys[$name] = 'FULLTEXT ';
                }

                //--- Tabellenspalten definieren ---
                if( $field['type'] != 'index' ) {
                    unset($field['index']);

                    // Field type
                    if( isset($field['length']) && ($field['length'] != '') ) {
                        $field['type'] .= '(' . $field['length'] . ((isset($field['precision']) && $field['precision'] != '') ? ',' . $field['precision'] : '') . ')';

                        unset( $field['length'] );
                        unset( $field['precision'] );
                    }

                    // Variant collation
                    if( ($field['collation'] != '') && ($field['collation'] != $GLOBALS['TL_CONFIG']['dbCollation']) ) {
                        $field['collation'] = 'COLLATE ' . $field['collation'];
                    }
                    else {
                        unset( $field['collation'] );
                    }

                    // Default values
                    if( in_array(strtolower($field['type']), array('text', 'tinytext', 'mediumtext', 'longtext', 'blob', 'tinyblob', 'mediumblob', 'longblob')) || stristr($field['extra'], 'auto_increment') || ($field['default'] === null) || (strtolower($field['null']) == 'null') ) {
                        unset( $field['default'] );
                    }
                    // Date/time constants (see #5089)
                    else if( in_array(strtolower($field['default']), array('current_date', 'current_time', 'current_timestamp')) ) {
                        $field['default'] = "default " . $field['default'];
                    }
                    // Everything else
                    else {
                        $field['default'] = "default '" . $field['default'] . "'";
                    }

                    unset( $field['origtype'] );
                    $result[$table]['TABLE_FIELDS'][$name] = trim( implode( ' ', $field ) );
                }

                //--- Index-Einträge ---
                if( isset($field['index']) && !empty($field['index_fields']) ) {
                    $index_fields = '`' . implode( '`, `', $field['index_fields'] ) . '`';
                    $index_fields = str_replace(array('(', ')`'), array('`(', ')'), $index_fields );

                    switch( $field['index'] ) {
                        case 'UNIQUE':  if( $name == 'PRIMARY' ) {
                                            $result[$table]['TABLE_CREATE_DEFINITIONS'][$name] = 'PRIMARY KEY  ('.$index_fields.')';
                                        }
                                        else {
                                            $result[$table]['TABLE_CREATE_DEFINITIONS'][$name] = 'UNIQUE KEY `'.$name.'` ('.$index_fields.')';
                                        }
                                        break;

                        default:        $result[$table]['TABLE_CREATE_DEFINITIONS'][$name] = (isset($keys[$name]) ? $keys[$name] : '') . 'KEY `'.$name.'` ('.$index_fields.')';
                                        break;
                    }
                    unset( $field['index_fields'] );
                    unset( $field['index'] );
                }
            }
        }

        // Table status
        $objStatus = $objDB->execute( 'SHOW TABLE STATUS' );
        while( $zeile = $objStatus->fetchAssoc() ) {
            $result[$zeile['Name']]['TABLE_OPTIONS'] = ' ENGINE=' . $zeile['Engine'] . ' DEFAULT CHARSET=' . substr($zeile['Collation'], 0, strpos($zeile['Collation'],"_"));

            if( $zeile['Auto_increment'] != '' ) {
                $result[$zeile['Name']]['TABLE_OPTIONS'] .= ' AUTO_INCREMENT=' . $zeile['Auto_increment'];
            }
        }

        return $result;
    }
1205421
protected function buildObjectsArray()
    {
        $objects = [];
        foreach ($this->objectConfigurations as $objectConfiguration) {
            $objectName = $objectConfiguration->getObjectName();
            $objects[$objectName] = [
                'l' => strtolower($objectName),
                's' => $objectConfiguration->getScope(),
                'p' => $objectConfiguration->getPackageKey()
            ];
            if ($objectConfiguration->getClassName() !== $objectName) {
                $objects[$objectName]['c'] = $objectConfiguration->getClassName();
            }
            if ($objectConfiguration->getFactoryObjectName() !== '') {
                $objects[$objectName]['f'] = [
                    $objectConfiguration->getFactoryObjectName(),
                    $objectConfiguration->getFactoryMethodName()
                ];

                $objects[$objectName]['fa'] = [];
                $factoryMethodArguments = $objectConfiguration->getArguments();
                if (count($factoryMethodArguments) > 0) {
                    foreach ($factoryMethodArguments as $index => $argument) {
                        $objects[$objectName]['fa'][$index] = [
                            't' => $argument->getType(),
                            'v' => $argument->getValue()
                        ];
                    }
                }
            }
        }
        $this->configurationCache->set('objects', $objects);
        return $objects;
    }
1311821
protected function fields()
    {
        return [
            $this->newField('title', 'string')->label('标题')
                ->required()->unique()->factory($this->faker->unique()),
            $this->newField('content', 'text')->label('内容')
                ->inList()->required()->factory($this->faker->realText()),
            $this->newField('password', 'string')->label('阅读密码')
                ->factory($this->faker->password),
            $this->newField('email', 'string')->label('反馈邮箱')
                ->validations('email')->factory($this->faker->unique()->safeEmail),
            $this->newField('category', 'string(15)')->label('分类')
                ->nullable()->inList()->factory($this->faker->randomElement(['好人', '坏蛋'])),
            $this->newField('status', 'integer')->label('状态')
                ->defaultValue(1)->inList(),
            $this->newField('created_by', 'integer:unsigned')->label('创建者')
                ->nullable()->inList()->factory($this->faker->randomDigitNotNull)
                ->belongsTo(User::class, 'created_by', 'id'),
            $this->newField('comments')->label('评论')
                ->hasMany('Modules\Blog\Models\Comment', 'blog_id', 'id')
        ];
    }
429231
public function getNames() {
		$names = [];

		$refl = new ReflectionObject($this);
		foreach ($refl->getProperties(ReflectionProperty::IS_PUBLIC) as $prop) {
			$names[] = $prop->name;
		}
		foreach (array_keys($this->factories_) as $name) {
			$names[] = $name;
		}

		sort($names);
		return $names;
	}
209028
public List<GetterType<BeanType<T>>> getAllGetter()
   {
      List<GetterType<BeanType<T>>> list = new ArrayList<GetterType<BeanType<T>>>();
      List<Node> nodeList = childNode.get("getter");
      for(Node node: nodeList)
      {
         GetterType<BeanType<T>>  type = new GetterTypeImpl<BeanType<T>>(this, "getter", childNode, node);
         list.add(type);
      }
      return list;
   }