Search in sources :

Example 1 with CastingRuleStaticMethod

use of stanhebben.zenscript.type.casting.CastingRuleStaticMethod in project ZenScript by CraftTweaker.

the class ZenExpandCaster method constructCastingRules.

public void constructCastingRules(IEnvironmentGlobal environment, ICastingRuleDelegate rules) {
    ZenType type = method.getReturnType();
    rules.registerCastingRule(type, new CastingRuleStaticMethod(method));
    type.constructCastingRules(environment, new CastingRuleDelegateStaticMethod(rules, method), false);
}
Also used : CastingRuleStaticMethod(stanhebben.zenscript.type.casting.CastingRuleStaticMethod) ZenType(stanhebben.zenscript.type.ZenType) CastingRuleDelegateStaticMethod(stanhebben.zenscript.type.casting.CastingRuleDelegateStaticMethod)

Aggregations

ZenType (stanhebben.zenscript.type.ZenType)1 CastingRuleDelegateStaticMethod (stanhebben.zenscript.type.casting.CastingRuleDelegateStaticMethod)1 CastingRuleStaticMethod (stanhebben.zenscript.type.casting.CastingRuleStaticMethod)1