{@inheritDoc}

@return
497461
@Override
    public SpringBootUtilityReturnCodes handleTask(ConsoleWrapper stdin, PrintStream stdout, PrintStream stderr, String[] args) throws Exception {
        this.stdin = stdin;
        this.stdout = stdout;
        this.stderr = stderr;

        validateArgumentList(args);

        String sourceAppPath = getArgumentValue(ARG_SOURCE_APP, args);
        String destThinAppPath = getArgumentValue(ARG_DEST_THIN_APP, args);
        String destLibCachePath = getArgumentValue(ARG_DEST_LIB_CACHE, args);
        String parentLibCachePath = getArgumentValue(ARG_PARENT_LIB_CACHE, args);

        if (!fileUtility.isFile(sourceAppPath)) {
            stdout.println(getMessage("thin.abort"));
            stdout.println(getMessage("thin.appNotFound", sourceAppPath));
            return SpringBootUtilityReturnCodes.ERR_APP_NOT_FOUND;
        }
        File sourceAppFile = new File(sourceAppPath).getAbsoluteFile();

        if (destThinAppPath == null) {
            String appName = sourceAppFile.getName();
            int lastDot = appName.lastIndexOf('.');
            if (lastDot > 0) {
                appName = appName.substring(0, lastDot + 1) + SpringConstants.SPRING_APP_TYPE;
            } else {
                appName += "." + SpringConstants.SPRING_APP_TYPE;
            }
            destThinAppPath = (sourceAppFile.getParent() == null ? "" : sourceAppFile.getParent()) + File.separator + appName;
        }
        if (fileUtility.isDirectory(destThinAppPath)) {
            stdout.println(getMessage("thin.abort"));
            stdout.println(getMessage("thin.appTargetIsDirectory", destThinAppPath));
            return SpringBootUtilityReturnCodes.ERR_APP_DEST_IS_DIR;
        }
        File thinAppFile = new File(destThinAppPath).getAbsoluteFile();
        if (!fileUtility.mkDirs(thinAppFile.getParentFile(), stdout)) {
            return SpringBootUtilityReturnCodes.ERR_MAKE_DIR;
        }

        if (destLibCachePath == null) {
            destLibCachePath = (sourceAppFile.getParent() == null ? "" : sourceAppFile.getParent()) + File.separator + SpringConstants.SPRING_LIB_CACHE_NAME;
        }
        if (fileUtility.isFile(destLibCachePath)) {
            stdout.println(getMessage("thin.abort"));
            stdout.println(getMessage("thin.libCacheIsFile", destLibCachePath));
            return SpringBootUtilityReturnCodes.ERR_LIB_DEST_IS_FILE;
        }
        File libCache = new File(destLibCachePath).getAbsoluteFile();
        if (!fileUtility.mkDirs(libCache, stdout)) {
            return SpringBootUtilityReturnCodes.ERR_MAKE_DIR;
        }
        File parentLibCache = null;
        if (parentLibCachePath != null) {
            parentLibCache = new File(parentLibCachePath).getAbsoluteFile();
            if (!fileUtility.mkDirs(parentLibCache, stdout)) {
                return SpringBootUtilityReturnCodes.ERR_MAKE_DIR;
            }
        }

        performThinTask(sourceAppFile, thinAppFile, libCache, parentLibCache);

        return SpringBootUtilityReturnCodes.OK;
    }
1335346
public function get($name)
    {
        $selected = null;
        /** @var ElementInterface|ContainerInterface $element */
        foreach ($this as $element) {
            if ($element->getName() == $name) {
                $selected = $element;
                break;
            }

            if ($element instanceof ContainerInterface) {
                $selected = $element->get($name);
                if (null !== $selected) {
                    break;
                }
            }
        }

        return $selected;
    }
1067706
public function obj()
    {
        if ($this->obj === null) {
            $formGroup = $this->formGroup();
            if ($formGroup instanceof self) {
                $prop = $formGroup->storageProperty();
                $val  = $formGroup->obj()->propertyValue($prop->ident());

                $this->obj = $prop->structureVal($val, [ 'default_data' => true ]);
                if ($this->obj === null) {
                    $this->obj = clone $prop->structureProto();
                }
            } elseif ($this->form() instanceof ObjectContainerInterface) {
                $this->obj = $this->form()->obj();
            }

            if ($this->obj === null) {
                throw new RuntimeException(sprintf(
                    'The [%1$s] widget has no data model.',
                    static::CLASS
                ));
            }
        }

        return $this->obj;
    }
422927
public static function instance($instance = null)
	{
		if ($instance !== null)
		{
			if ( ! array_key_exists($instance, static::$_instances))
			{
				return false;
			}

			return static::$_instances[$instance];
		}

		if (static::$_instance === null)
		{
			static::$_instance = static::forge();
		}

		return static::$_instance;
	}
1350788
public function c ()
    {
        $fields = array();
        foreach ($this->getFields() as $field)
            /* @var $field Field */
            if ($field->getCollectData())
                $fields[] = $field;
        return $fields;
    }
1317099
public function get($id)
    {
        if (isset($this->resolved[$id])) {
            return $this->resolved[$id];
        }
        $definition = null;
        if (isset($this->definitions[$id])) {
            $definition = $this->definitions[$id];
        }
        foreach ($this->resolvers as &$resolver) {
            if (is_string($resolver)) {
                $resolver = new $resolver;
            }
            if (!$resolver->supports($id, $definition)) {
                continue;
            }
            $service = $resolver->resolve(
                $this,
                $id,
                $definition
            );
            if (false !== $service) {
                if (isset($this->extensions[$id]) && is_array($this->extensions[$id])) {
                    foreach ($this->extensions[$id] as $extension) {
                        $service = $extension($service, $this);
                    }
                }
                if (isset($this->shared[$id])) {
                    $this->resolved[$id] = $service;
                }
                return $service;
            }
        }

        throw new NotFoundException(
            sprintf('Service \'%s\' not found', $id)
        );
    }
598351
final public function get($method = null) {

        if ( empty($method) ) {

            $return = $this->rpc_methods;

        } else if ( array_key_exists($method, $this->rpc_methods) ) {

            $return = $this->rpc_methods[$method];

        } else {

            $return = null;

        }

        return $return;

    }
850094
public static <E> Iterator<E> get() {
		@SuppressWarnings("unchecked")
		Iterator<E> iter = (Iterator<E>) INSTANCE;
		return iter;
	}
432098
public function build(): SetReturnValueRequest
	{
		$instance = new SetReturnValueRequest();
		if ($this->newValue === null) {
			throw new BuilderException('Property [newValue] is required.');
		}
		$instance->newValue = $this->newValue;
		return $instance;
	}
657653
public function get($id)
    {
        /** @var ContainerInterface $container */
        foreach ($this->containers as $container) {
            if ($container->has($id)) {
                return $container->get($id);
            }
        }

        throw NotFoundException::fromPrevious($id);
    }
241532
public function get($id) {
		$source = $id;
		while (is_string($source) && isset($this->getter[$source])) {
			$source = $this->getter[$source];
		}
		if (!is_string($source)) {
			if ($source instanceof \Closure) {
				$source->bindTo($this);
				return $source();
			} elseif (is_object($source)) {
				return $source;
			} else {
				throw new NotFoundException("Class $id not found");
			}
		}
		if (isset($this->instance[$source])) {
			if (!isset($this->multi[$source])) {
				return $this->instance[$source];
			} elseif ($this->multi[$source] === self::MULTI_CLONE) {
				return clone $this->instance[$source];
			}
		}
		if (!class_exists($source)) {
			throw new NotFoundException("Class $id not found");
		}
		// Check cyclic dependency
		if (isset($this->creating[$source])) {
			throw new CyclicDependencyException("Found cyclic dependency of $id");
		}
		$this->creating[$source] = true;
		$ref = new ReflectionClass($source);
		if (!$ref->isInstantiable()) {
			throw new InvalidClassException("Can not create instance of $id");
		}
		// constructor
		$constructor = $ref->getConstructor();
		if ($constructor !== null) {
			// Read comment for getter
			$comment = $constructor->getDocComment();
			$is_autowire = preg_match_all('/@Autowired\s+([\w\\\\]+)\s+([\w\\\\]+)\s+/', $comment, $autowire_matches);
			$getter = [];
			if ($is_autowire && count($autowire_matches[1]) > 0) {
				foreach ($autowire_matches[1] as $k => $v) {
					$getter[$v] = $autowire_matches[2][$k];
				}
			}
			$params = $constructor->getParameters();
			$init_params = [];
			foreach ($params as $param) {
				if ($param->isOptional()) {
					$init_params[] = $param->getDefaultValue();
				} elseif (isset($getter[$param->getName()])) {
					$typeName = $getter[$param->getName()];
					$init_params[] = $this->get($typeName);
				} elseif ($param->hasType()) {
					$type = $param->getType();
					if (class_exists('ReflectionNamedType') && $type instanceof \ReflectionNamedType) {
						$typeName = $type->getName();
					} else {
						$typeName = $type->__toString();
					}
					if ($type->isBuiltin()) {
						$value = null;
						settype($value, $typeName);
						$init_params[] = $value;
					} else {
						$init_params[] = $this->get($typeName);
					}
				} else {
					$init_params[] = null;
				}
			}
			$instance = $ref->newInstance(...$init_params);
		} else {
			$instance = $ref->newInstance();
		}
		// properties
		$properties = $ref->getProperties();
		foreach ($properties as $property) {
			if ($property->isStatic()) {
				continue;
			}
			// Using getter and setter
			$propertyName = $property->getName();
			$setter = 'set' . ucfirst($propertyName);
			$getter = 'get' . ucfirst($propertyName);
			if (method_exists($instance, $setter) && method_exists($instance, $getter)) {
				if ($instance->$getter() === null) {
					$setter_ref = $ref->getMethod($setter);
					$is_autowire = preg_match('/@Autowired\s+([\w\\\\]+)\s+/', $setter_ref->getDocComment(), $autowire);
					if ($is_autowire) {
						$instance->$setter($this->get($autowire[1]));
					} else {
						$params = $setter_ref->getParameters();
						$param = $params[0];
						if ($param->hasType()) {
							$type = $param->getType();
							if (class_exists('ReflectionNamedType') && $type instanceof \ReflectionNamedType) {
								$typeName = $type->getName();
							} else {
								$typeName = $type->__toString();
							}
							$instance->$setter($this->get($typeName));
						}
					}
				}
			} else {
				$comment = $property->getDocComment();
				$is_autowire = preg_match('/@Autowired\s+([\w\\\\]+)\s+/', $comment, $autowire);
				if ($is_autowire) {
					$is_public = $property->isPublic();
					if (!$is_public) {
						$property->setAccessible(true);
					}
					if ($property->getValue($instance) === null) {
						$property->setValue($instance, $this->get($autowire[1]));
					}
					if (!$is_public) {
						$property->setAccessible(false);
					}
				}
			}
		}
		// put into instance
		if (!isset($this->multi[$source]) || $this->multi[$source] === self::MULTI_CLONE) {
			$this->instance[$source] = $instance;
		}
		unset($this->creating[$source]);
		return $instance;
	}
101895
public function clear($key)
    {
        if (true === $this->isAttribute($key)) {
            return $this->setAttribute($key, null);
        }
        if (true === $this->isEmbedHasOne($key)) {
            return $this->setEmbedHasOne($key, null);
        }
        if (true === $this->isEmbedHasMany($key)) {
            $collection = $this->hasManyEmbeds->get($key);
            $collection->clear();
            $this->doDirtyCheck();
            return $this;
        }
        return $this;
    }
1235572
final public static function getInstance(?array $configurations = null): self
    {
        if (is_null(self::$instance)) {
            self::$instance = new self($configurations);
        }
        return self::$instance;
    }
872328
public function read(&$result)
    {
        $relations = [];
        $conditions = [];

        foreach ($result as $i => $entity) {
            $container = $this->accessor->getPropertyValue($entity, $this->definition->container());
            if (empty($container)) {
                $this->accessor->setPropertyValue($entity, $this->definition->container(), []);
            }

            foreach ($this->definition->keys() as $local => $refer) {
                $conditions[$refer][] = $this->accessor->getPropertyValue($entity, $local);
            }

            $relations[$this->buildLocalKey($entity, $this->definition->keys())][] = &$result[$i];
        }

        $collection = $this->fetch($this->definition->entity(), $conditions, true);

        foreach ($collection as $relEntity) {
            $key = $this->buildForeignKey($relEntity, $this->definition->keys());

            if (!isset($relations[$key])) {
                continue;
            }

            foreach ($relations[$key] as &$entity) {
                $this->accessor->addPropertyValue($entity, $this->definition->container(), $relEntity);
                unset($entity);
            }
        }

        return $result;
    }
181475
public function build(): GetMatchedStylesForNodeRequest
	{
		$instance = new GetMatchedStylesForNodeRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		return $instance;
	}
492481
public function getDistinct(string $method, bool $returnValue = true)
    {
        $isMethod = null;

        $array = [];

        foreach ($this->elements as $item) {
            $value = $this->elementMethodCall($method, $item, $isMethod);

            if (!in_array($value, $array, true)) {
                $array[] = $returnValue ? $value : $item;
            }
        }

        $clone = clone $this;
        $clone->elements = array_unique($array, SORT_REGULAR);

        return $clone;
    }
346980
public function instance(?string $configuration = null)
	{
		$configuration = $configuration ?? $this->default;

		if(!isset($this->instances[$configuration]))
		{
			$this->instances[$configuration] = $this->instantiate($configuration);
		}

		return $this->instances[$configuration];
	}