---------------------------- Static methods ----------------------------------
509566
public static ResourceManagerRuntimeServicesConfiguration fromConfiguration(Configuration configuration) throws ConfigurationException {

		final String strJobTimeout = configuration.getString(ResourceManagerOptions.JOB_TIMEOUT);
		final Time jobTimeout;

		try {
			jobTimeout = Time.milliseconds(Duration.apply(strJobTimeout).toMillis());
		} catch (NumberFormatException e) {
			throw new ConfigurationException("Could not parse the resource manager's job timeout " +
				"value " + ResourceManagerOptions.JOB_TIMEOUT + '.', e);
		}

		final SlotManagerConfiguration slotManagerConfiguration = SlotManagerConfiguration.fromConfiguration(configuration);

		return new ResourceManagerRuntimeServicesConfiguration(jobTimeout, slotManagerConfiguration);
	}
747808
public function init(): void
    {
        parent::init();

        if ($this->default !== '' && $this->default !== null && !is_array($this->default)) {
            try {
                $default = Json::decode($this->default);

                if (is_array($default)) {
                    $this->default = $default;
                }
            } catch (InvalidArgumentException $exception) {}
        }
    }
970680
public function init()
    {
        if ($this->countRows < 1) {
            $this->totalPages = 0;
            $this->currentPage = 0;

            return;
        }

        if ($this->limit < 10) {
            $this->limit = 10;
        }

        $this->totalPages = (int)($this->countRows / $this->limit);

        if ($this->countRows % $this->limit) {
            $this->totalPages++;
        }

        if ($this->totalPages === 0) {
            $this->totalPages = 1;
        }

        if ($this->currentPage < 0) {
            $this->currentPage = 0;
        }

        if ($this->currentPage > $this->totalPages) {
            $this->currentPage = $this->totalPages;
        }
    }
921083
protected void maybeLoadMethods ()
    {
        if (_methodMap == null) {
            _methodMap = new HashMap<String,List<Member>>();
            Method[] methods = _clazz.getMethods();

            for (int i = 0; i < methods.length; ++i) {
                Method m = methods[i];
                String methodName = m.getName();
                Class<?>[] paramTypes = m.getParameterTypes();

                List<Member> list = _methodMap.get(methodName);
                if (list == null) {
                    list = new ArrayList<Member>();
                    _methodMap.put(methodName, list);
                }

                if (!ClassUtil.classIsAccessible(_clazz)) {
                    m = ClassUtil.getAccessibleMethodFrom(_clazz, methodName, paramTypes );
                }

                if (m != null) {
                    list.add(m);
                    _paramMap.put(m, paramTypes);
                }
            }
        }
    }
20017
@Override
    public void visitCode(Code obj) {
        if (Values.CONSTRUCTOR.equals(methodName) || Values.STATIC_INITIALIZER.equals(methodName)) {
            return;
        }

        Method m = getMethod();
        if (m.isSynthetic()) {
            return;
        }

        if (!interfaceMethods.contains(new QMethod(methodName, m.getSignature()))) {
            super.visitCode(obj);
        }
    }
806305
static function __static()
	{

		DOMXPathNavigator::$nodeTypeMap = array(
			XML_ELEMENT_NODE => XPathNodeType::Element,
			XML_ATTRIBUTE_NODE => XPathNodeType::Attribute,
			XML_TEXT_NODE => XPathNodeType::Text,
			// XML_CDATA_SECTION_NODE => 4,
			// XML_ENTITY_REF_NODE => 5,
			// XML_ENTITY_NODE => 6,
			XML_PI_NODE => XPathNodeType::ProcessingInstruction,
			XML_COMMENT_NODE => XPathNodeType::Comment,
			XML_DOCUMENT_NODE => XPathNodeType::Root,
			// XML_DOCUMENT_TYPE_NODE => XPathNodeType::Element, // .NET does not consider this an element
			// XML_DOCUMENT_FRAG_NODE => 11,
			XML_NOTATION_NODE => 12,
			// XML_HTML_DOCUMENT_NODE => 13,
			// XML_DTD_NODE => 14,
			XML_ELEMENT_DECL_NODE => XPathNodeType::Element,
			XML_ATTRIBUTE_DECL_NODE => XPathNodeType::Attribute,
			// XML_ENTITY_DECL_NODE => 17,
			XML_NAMESPACE_DECL_NODE => XPathNodeType::NamespaceURI,
		);

	}
310608
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$backend = (string)$baseClass->Session->Backend;
            static::$savePath = $baseClass->parsePath($baseClass->Session->SavePath);
            static::$savePath = \trim(\session_save_path()) != '' ? \session_save_path() : static::$savePath;

            Directory::create(static::$savePath);
        }
    }
716853
public void addNewStaticMethod(Method method) {
        final CachedMethod cachedMethod = CachedMethod.find(method);
        NewStaticMetaMethod newMethod = new NewStaticMetaMethod(cachedMethod);
        final CachedClass declaringClass = newMethod.getDeclaringClass();
        addNewStaticMethodToIndex(newMethod, metaMethodIndex.getHeader(declaringClass.getTheClass()));
    }
377730
@Override
    public void visitCode(Code obj) {
        if (!Values.STATIC_INITIALIZER.equals(getMethodName())) {
            state = State.SEEN_NOTHING;
            super.visitCode(obj);
        }
    }
124097
static function __static()
	{
		XmlTypeCode::$typeToCodeMap = array(
			'xs:anyType'				=> XmlTypeCode::AnyType,
			'xs:anySimpleType'			=> XmlTypeCode::AnyAtomicType,
			'xs:untypedAtomic'			=> XmlTypeCode::UntypedAtomic,
			'xs:string'					=> XmlTypeCode::String,
			'xs:boolean'				=> XmlTypeCode::Boolean,
			'xs:decimal'				=> XmlTypeCode::Decimal,
			'xs:double'					=> XmlTypeCode::Double,
			'xs:float'					=> XmlTypeCode::Float,
			'xs:duration'				=> XmlTypeCode::Duration,
			'xs:dateTime'				=> XmlTypeCode::DateTime,
			'xs:time'					=> XmlTypeCode::Time,
			'xs:date'					=> XmlTypeCode::Date,
			'xs:gYearMonth'				=> XmlTypeCode::GYearMonth,
			'xs:gYear'					=> XmlTypeCode::GYear,
			'xs:gMonthDay'				=> XmlTypeCode::GMonthDay,
			'xs:gDay'					=> XmlTypeCode::GDay,
			'xs:gMonth'					=> XmlTypeCode::GMonth,
			'xs:hexBinary'				=> XmlTypeCode::HexBinary,
			'xs:base64Binary'			=> XmlTypeCode::Base64Binary,
			'xs:anyURI'					=> XmlTypeCode::AnyUri,
			'xs:QName'					=> XmlTypeCode::QName,
			'xs:NOTATION'				=> XmlTypeCode::Notation,
			'xs:normalizedString'		=> XmlTypeCode::NormalizedString,
			'xs:token'					=> XmlTypeCode::Token,
			'xs:language'				=> XmlTypeCode::Language,
			'xs:Name'					=> XmlTypeCode::Name,
			'xs:NCName'					=> XmlTypeCode::NCName,
			'xs:NMTOKEN'				=> XmlTypeCode::NmToken,
			'xs:ID'						=> XmlTypeCode::Id,
			'xs:IDREF'					=> XmlTypeCode::Idref,
			'xs:ENTITY'					=> XmlTypeCode::Entity,
			'xs:integer'				=> XmlTypeCode::Integer,
			'xs:nonPositiveInteger'		=> XmlTypeCode::NonPositiveInteger,
			'xs:long'					=> XmlTypeCode::Long,
			'xs:nonNegativeInteger'		=> XmlTypeCode::NonNegativeInteger,
			'xs:negativeInteger' 		=> XmlTypeCode::NegativeInteger,
			'xs:int'					=> XmlTypeCode::Int,
			'xs:short'					=> XmlTypeCode::Short,
			'xs:byte'					=> XmlTypeCode::Byte,
			'xs:positiveInteger' 		=> XmlTypeCode::PositiveInteger,
			'xs:unsignedLong' 			=> XmlTypeCode::UnsignedLong,
			'xs:unsignedInt' 			=> XmlTypeCode::UnsignedInt,
			'xs:unsignedShort'			=> XmlTypeCode::UnsignedShort,
			'xs:unsignedByte'			=> XmlTypeCode::UnsignedByte,
			'xs:IDREFS'					=> XmlTypeCode::IDREFS,
			'xs:ENTITIES'				=> XmlTypeCode::ENTITIES,
			'xs:NMTOKENS'				=> XmlTypeCode::NMTOKENS,
			'xs:yearMonthDuration'		=> XmlTypeCode::YearMonthDuration,
			'xs:dayTimeDuration'		=> XmlTypeCode::DayTimeDuration,
			'xs:UNION'					=> XmlTypeCode::UNION,
		);

		XmlTypeCode::$codeToTypeMap = array_flip( XmlTypeCode::$typeToCodeMap );
	}
520189
public static function __static()
	{
		Types::$NullType					= Type::FromNameAndTypeCode( Type::null_, TypeCode::Null_ );
		Types::$ArrayType					= Type::FromNameAndTypeCode( Type::assocArray, TypeCode::AssocArray );
		Types::$BoolType					= Type::FromNameAndTypeCode( Type::bool, TypeCode::Boolean );
		Types::$BooleanType					= Types::$BoolType;
		Types::$ByteType					= Type::FromNameAndTypeCode( Type::byte, TypeCode::Int32 );
		Types::$CharType					= Type::FromNameAndTypeCode( Type::char, TypeCode::String );
		Types::$DateTimeIntervalType		= Type::FromNameAndTypeCode( Type::dateTimeInterval, TypeCode::DateTimeInterval );
		Types::$DateTimeValueType			= Type::FromNameAndTypeCode( DateTimeValue::$CLASSNAME, TypeCode::DateTime );
		Types::$DateValueType				= Type::FromNameAndTypeCode( DateValue::$CLASSNAME, TypeCode::DateTime );
		Types::$DayTimeDurationValueType	= Type::FromNameAndTypeCode( DayTimeDurationValue::$CLASSNAME, TypeCode::DateTimeInterval );
		// Types::$DecimalType				= Type::FromNameAndTypeCode( Type::decimal, TypeCode::Float );
		Types::$DecimalType					= Type::FromNameAndTypeCode( DecimalValue::$CLASSNAME, TypeCode::Decimal );
		Types::$DurationValueType			= Type::FromNameAndTypeCode( DurationValue::$CLASSNAME, TypeCode::DateTimeInterval );
		Types::$FloatType					= Type::FromNameAndTypeCode( Type::float, TypeCode::Float );
		Types::$DoubleType					= Type::FromNameAndTypeCode( Type::double, TypeCode::Float );
		// Types::$DoubleType					= Types::$FloatType;
		Types::$Int16Type					= Type::FromNameAndTypeCode( Type::int16, TypeCode::Int32 );
		Types::$Int32Type					= Type::FromNameAndTypeCode( Type::int32, TypeCode::Int32 );
		Types::$Int64Type					= Type::FromNameAndTypeCode( Type::int64, TypeCode::Int32 );
		Types::$IntType						= Types::$Int32Type;
		Types::$IntegerType					= Type::FromNameAndTypeCode( Integer::$CLASSNAME, TypeCode::Float );
		// Types::$LongType					= Types::$Int64Type;
		Types::$LongType					= Type::FromNameAndTypeCode( Long::$CLASSNAME, TypeCode::Int64 );
		Types::$ObjectType					= Type::FromNameAndTypeCode( Type::object, TypeCode::Object );
		Types::$SByteType					= Type::FromNameAndTypeCode( Type::sbyte, TypeCode::Int32 );
		Types::$ShortType					= Types::$Int16Type;
		Types::$StringType					= Type::FromNameAndTypeCode( Type::string, TypeCode::String );
		Types::$TimeValueType				= Type::FromNameAndTypeCode( "lyquidity\XPath2\Value\TimeValue", TypeCode::DateTime );
		Types::$UInt16Type					= Type::FromNameAndTypeCode( Type::uint16, TypeCode::Int32 );
		Types::$UInt32Type					= Type::FromNameAndTypeCode( Type::uint32, TypeCode::Int32 );
		Types::$UInt64Type					= Type::FromNameAndTypeCode( Type::uint64, TypeCode::Int32 );

		Types::$AnyUriValueType				= Type::FromNameAndTypeCode( AnyUriValue::$CLASSNAME, TypeCode::Object );
		Types::$Base64BinaryValueType		= Type::FromNameAndTypeCode( Base64BinaryValue::$CLASSNAME, TypeCode::Object );
		Types::$ENTITIESValueType			= Type::FromNameAndTypeCode( ENTITIESValue::$CLASSNAME, TypeCode::Object );
		Types::$GDayValueType				= Type::FromNameAndTypeCode( GDayValue::$CLASSNAME, TypeCode::DateTime );
		Types::$GMonthValueType				= Type::FromNameAndTypeCode( GMonthValue::$CLASSNAME, TypeCode::DateTime );
		Types::$GMonthDayValueType			= Type::FromNameAndTypeCode( GMonthDayValue::$CLASSNAME, TypeCode::DateTime );
		Types::$GYearMonthValueType			= Type::FromNameAndTypeCode( GYearMonthValue::$CLASSNAME, TypeCode::DateTime );
		Types::$GYearValueType				= Type::FromNameAndTypeCode( GYearValue::$CLASSNAME, TypeCode::DateTime );
		Types::$HexBinaryValueType			= Type::FromNameAndTypeCode( HexBinaryValue::$CLASSNAME, TypeCode::Object );
		Types::$IDREFSValueType				= Type::FromNameAndTypeCode( IDREFSValue::$CLASSNAME, TypeCode::Object );
		Types::$NMTOKENSValueType			= Type::FromNameAndTypeCode( NMTOKENSValue::$CLASSNAME, TypeCode::Object );
		Types::$QNameValueType				= Type::FromNameAndTypeCode( QNameValue::$CLASSNAME, TypeCode::Object );
		Types::$UntypedAtomicType			= Type::FromNameAndTypeCode( UntypedAtomic::$CLASSNAME, TypeCode::Object );
		Types::$YearMonthDurationValueType	= Type::FromNameAndTypeCode( YearMonthDurationValue::$CLASSNAME, TypeCode::DateTimeInterval );
		Types::$UNION						= Type::FromNameAndTypeCode( Type::union, TypeCode::UNION );
	}
1133992
public static function initialize()
    {
        if (static::$isConfigurationLoaded === true) {
            return;
        }
        
        foreach (static::$handlers as $handler) {
            EventManager::getInstance()->addEventHandler($handler[0], $handler[1], $handler[2], $handler[3]);
        }

        static::$isConfigurationLoaded = true;
    }
48246
def _update_staticmethod(self, oldsm, newsm):
        """"""
        # While we can't modify the staticmethod object itself (it has no
        # mutable attributes), we *can* extract the underlying function
        # (by calling __get__(), which returns it) and update it in-place.
        # We don't have the class available to pass to __get__() but any
        # object except None will do.
        self._update(None, None, oldsm.__get__(0), newsm.__get__(0))
532841
def collect_static(static_folder):
    
    appbuilder_static_path = os.path.join(
        os.path.dirname(os.path.abspath(__file__)), "static/appbuilder"
    )
    app_static_path = os.path.join(os.getcwd(), static_folder)
    if not os.path.isdir(app_static_path):
        click.echo(
            click.style(
                "Static folder does not exist creating: %s" % app_static_path,
                fg="green",
            )
        )
        os.makedirs(app_static_path)
    try:
        shutil.copytree(
            appbuilder_static_path, os.path.join(app_static_path, "appbuilder")
        )
    except Exception:
        click.echo(
            click.style(
                "Appbuilder static folder already exists on your project", fg="red"
            )
        )
853836
static <T extends Annotation> T findAnnotation(Method method, Class<T> clazz) {
		T annotation = AnnotationUtils.findAnnotation(method, clazz);
		if (annotation == null) {
			try {
				annotation = AnnotationUtils.findAnnotation(method.getDeclaringClass()
						.getMethod(method.getName(), method.getParameterTypes()), clazz);
			}
			catch (NoSuchMethodException | SecurityException ex) {
				if (log.isDebugEnabled()) {
					log.debug("Exception occurred while tyring to find the annotation",
							ex);
				}
			}
		}
		return annotation;
	}
548479
def static(self, uri, file_or_directory, *args, **kwargs):
        
        static = FutureStatic(uri, file_or_directory, args, kwargs)
        self.statics.append(static)
146016
public function init(): void
    {
        parent::init();

        $this->cache = $this->enabled ? $this->app->ensureObject($this->cache, CacheInterface::class) : null;

        if ($this->cache instanceof CacheInterface && $this->getCachedContent() === false) {
            $this->getView()->pushDynamicContent($this);
            ob_start();
            ob_implicit_flush(false);
        }
    }