protected Result<TypeRef> thisTypeRefImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final EObject location) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleThisTypeRefEObject(G, _subtrace_, location); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("thisTypeRefEObject") + stringRepForEnv(G) + " |~ " + stringRep(location) + " ~> " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleThisTypeRefEObject) { thisTypeRefThrowException(ruleName("thisTypeRefEObject") + stringRepForEnv(G) + " |~ " + stringRep(location) + " ~> " + "TypeRef", THISTYPEREFEOBJECT, e_applyRuleThisTypeRefEObject, location, new ErrorInformation[] {new ErrorInformation(location)}); return null; } }
protected Result<TypeArgument> substTypeVariablesImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ComposedTypeRef typeRef) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeArgument> _result_ = applyRuleSubstTypeVariablesInComposedTypeRef(G, _subtrace_, typeRef); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("substTypeVariablesInComposedTypeRef") + stringRepForEnv(G) + " |- " + stringRep(typeRef) + " ~> " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSubstTypeVariablesInComposedTypeRef) { substTypeVariablesThrowException(ruleName("substTypeVariablesInComposedTypeRef") + stringRepForEnv(G) + " |- " + stringRep(typeRef) + " ~> " + "ComposedTypeRef", SUBSTTYPEVARIABLESINCOMPOSEDTYPEREF, e_applyRuleSubstTypeVariablesInComposedTypeRef, typeRef, new ErrorInformation[] {new ErrorInformation(typeRef)}); return null; } }
@Override protected void configureModules() { super.configureModules(); addModule(new AbstractModule() { @Override public void configure() { bind(IWorldMessageTranslator.class).to(BotFSM.class); bind(IWorldView.class).to(IVisionWorldView.class); bind(IVisionWorldView.class).to(ILockableVisionWorldView.class); bind(ILockableWorldView.class).to(ILockableVisionWorldView.class); bind(ILockableVisionWorldView.class).to(UT2004SyncLockableWorldView.class); bind(ComponentDependencies.class).annotatedWith(Names.named(UT2004SyncLockableWorldView.WORLDVIEW_DEPENDENCY)).toProvider(worldViewDependenciesProvider); bind(IAgent.class).to(IAgent3D.class); bind(IAgent3D.class).to(IUT2004Bot.class); bind(IUT2004Bot.class).to(UT2004Bot.class); if (botControllerClass != null) { bind(IUT2004BotController.class).to(botControllerClass); } bind(UT2004BotParameters.class).toProvider((Provider<? extends UT2004BotParameters>) getAgentParamsProvider()); } }); }
protected Result<Boolean> subtypeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TypeTypeRef left, final TypeTypeRef right) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<Boolean> _result_ = applyRuleSubtypeTypeTypeRef(G, _subtrace_, left, right); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("subtypeTypeTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSubtypeTypeTypeRef) { subtypeThrowException(ruleName("subtypeTypeTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right), SUBTYPETYPETYPEREF, e_applyRuleSubtypeTypeTypeRef, left, right, new ErrorInformation[] {new ErrorInformation(left), new ErrorInformation(right)}); return null; } }
private Provider<?> getProvider(final Class<?> clazz, final BindType bindType) { Provider<?> provider = new Provider<Object>() { @Override public Object get() { try { Object instance = null; if (bindType == BindType.SPY) { instance = spy(clazz.newInstance()); } else if (bindType == BindType.MOCK) { instance = mock(clazz); } return instance; } catch (Exception e) { e.printStackTrace(); } return null; } }; return provider; }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TEnumLiteral enumLiteral) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeTEnumLiteral(G, _subtrace_, enumLiteral); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeTEnumLiteral") + stringRepForEnv(G) + " |- " + stringRep(enumLiteral) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeTEnumLiteral) { typeThrowException(ruleName("typeTEnumLiteral") + stringRepForEnv(G) + " |- " + stringRep(enumLiteral) + " : " + "TypeRef", TYPETENUMLITERAL, e_applyRuleTypeTEnumLiteral, enumLiteral, new ErrorInformation[] {new ErrorInformation(enumLiteral)}); return null; } }
protected Result<TypeRef> expectedTypeInImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final PostfixExpression e, final Expression expression) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleExpectedTypeInPostfixExpression(G, _subtrace_, e, expression); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("expectedTypeInPostfixExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " |> " + stringRep(expression) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleExpectedTypeInPostfixExpression) { expectedTypeInThrowException(ruleName("expectedTypeInPostfixExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " |> " + stringRep(expression) + " : " + "TypeRef", EXPECTEDTYPEINPOSTFIXEXPRESSION, e_applyRuleExpectedTypeInPostfixExpression, e, expression, new ErrorInformation[] {new ErrorInformation(e), new ErrorInformation(expression)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TVariable tvariable) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeTVariable(G, _subtrace_, tvariable); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeTVariable") + stringRepForEnv(G) + " |- " + stringRep(tvariable) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeTVariable) { typeThrowException(ruleName("typeTVariable") + stringRepForEnv(G) + " |- " + stringRep(tvariable) + " : " + "TypeRef", TYPETVARIABLE, e_applyRuleTypeTVariable, tvariable, new ErrorInformation[] {new ErrorInformation(tvariable)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ObjectLiteral ol) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeObjectLiteral(G, _subtrace_, ol); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeObjectLiteral") + stringRepForEnv(G) + " |- " + stringRep(ol) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeObjectLiteral) { typeThrowException(ruleName("typeObjectLiteral") + stringRepForEnv(G) + " |- " + stringRep(ol) + " : " + "TypeRef", TYPEOBJECTLITERAL, e_applyRuleTypeObjectLiteral, ol, new ErrorInformation[] {new ErrorInformation(ol)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final SuperLiteral superLiteral) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeSuperLiteral(G, _subtrace_, superLiteral); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeSuperLiteral") + stringRepForEnv(G) + " |- " + stringRep(superLiteral) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeSuperLiteral) { typeThrowException(ruleName("typeSuperLiteral") + stringRepForEnv(G) + " |- " + stringRep(superLiteral) + " : " + "TypeRef", TYPESUPERLITERAL, e_applyRuleTypeSuperLiteral, superLiteral, new ErrorInformation[] {new ErrorInformation(superLiteral)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final IdentifierRef idref) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeIdentifierRef(G, _subtrace_, idref); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeIdentifierRef") + stringRepForEnv(G) + " |- " + stringRep(idref) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeIdentifierRef) { typeThrowException(ruleName("typeIdentifierRef") + stringRepForEnv(G) + " |- " + stringRep(idref) + " : " + "TypeRef", TYPEIDENTIFIERREF, e_applyRuleTypeIdentifierRef, idref, new ErrorInformation[] {new ErrorInformation(idref)}); return null; } }
protected Result<TypeRef> expectedTypeInImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final VariableBinding binding, final Expression initExpr) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleExpectedTypeOfRightSideInVariableBinding(G, _subtrace_, binding, initExpr); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("expectedTypeOfRightSideInVariableBinding") + stringRepForEnv(G) + " |- " + stringRep(binding) + " |> " + stringRep(initExpr) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleExpectedTypeOfRightSideInVariableBinding) { expectedTypeInThrowException(ruleName("expectedTypeOfRightSideInVariableBinding") + stringRepForEnv(G) + " |- " + stringRep(binding) + " |> " + stringRep(initExpr) + " : " + "TypeRef", EXPECTEDTYPEOFRIGHTSIDEINVARIABLEBINDING, e_applyRuleExpectedTypeOfRightSideInVariableBinding, binding, initExpr, new ErrorInformation[] {new ErrorInformation(binding), new ErrorInformation(initExpr)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final N4EnumLiteral enumLiteral) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeN4EnumLiteral(G, _subtrace_, enumLiteral); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeN4EnumLiteral") + stringRepForEnv(G) + " |- " + stringRep(enumLiteral) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeN4EnumLiteral) { typeThrowException(ruleName("typeN4EnumLiteral") + stringRepForEnv(G) + " |- " + stringRep(enumLiteral) + " : " + "TypeRef", TYPEN4ENUMLITERAL, e_applyRuleTypeN4EnumLiteral, enumLiteral, new ErrorInformation[] {new ErrorInformation(enumLiteral)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ArrayLiteral al) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeArrayLiteral(G, _subtrace_, al); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeArrayLiteral") + stringRepForEnv(G) + " |- " + stringRep(al) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeArrayLiteral) { typeThrowException(ruleName("typeArrayLiteral") + stringRepForEnv(G) + " |- " + stringRep(al) + " : " + "TypeRef", TYPEARRAYLITERAL, e_applyRuleTypeArrayLiteral, al, new ErrorInformation[] {new ErrorInformation(al)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final N4FieldDeclaration fieldDecl) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeN4FieldDeclaration(G, _subtrace_, fieldDecl); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeN4FieldDeclaration") + stringRepForEnv(G) + " |- " + stringRep(fieldDecl) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeN4FieldDeclaration) { typeThrowException(ruleName("typeN4FieldDeclaration") + stringRepForEnv(G) + " |- " + stringRep(fieldDecl) + " : " + "TypeRef", TYPEN4FIELDDECLARATION, e_applyRuleTypeN4FieldDeclaration, fieldDecl, new ErrorInformation[] {new ErrorInformation(fieldDecl)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ParenExpression e) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeParenExpression(G, _subtrace_, e); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeParenExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeParenExpression) { typeThrowException(ruleName("typeParenExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "TypeRef", TYPEPARENEXPRESSION, e_applyRuleTypeParenExpression, e, new ErrorInformation[] {new ErrorInformation(e)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final AwaitExpression e) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeAwaitExpression(G, _subtrace_, e); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeAwaitExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeAwaitExpression) { typeThrowException(ruleName("typeAwaitExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "TypeRef", TYPEAWAITEXPRESSION, e_applyRuleTypeAwaitExpression, e, new ErrorInformation[] {new ErrorInformation(e)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ParameterizedPropertyAccessExpression expr) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypePropertyAccessExpression(G, _subtrace_, expr); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typePropertyAccessExpression") + stringRepForEnv(G) + " |- " + stringRep(expr) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypePropertyAccessExpression) { typeThrowException(ruleName("typePropertyAccessExpression") + stringRepForEnv(G) + " |- " + stringRep(expr) + " : " + "TypeRef", TYPEPROPERTYACCESSEXPRESSION, e_applyRuleTypePropertyAccessExpression, expr, new ErrorInformation[] {new ErrorInformation(expr)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final NewTarget nt) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeNewTarget(G, _subtrace_, nt); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeNewTarget") + stringRepForEnv(G) + " |- " + stringRep(nt) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeNewTarget) { typeThrowException(ruleName("typeNewTarget") + stringRepForEnv(G) + " |- " + stringRep(nt) + " : " + "TypeRef", TYPENEWTARGET, e_applyRuleTypeNewTarget, nt, new ErrorInformation[] {new ErrorInformation(nt)}); return null; } }
protected Result<Boolean> subtypeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TypeTypeRef left, final ParameterizedTypeRef right) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<Boolean> _result_ = applyRuleSubtypeTypeTypeRef__ParameterizedTypeRef(G, _subtrace_, left, right); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("subtypeTypeTypeRef__ParameterizedTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSubtypeTypeTypeRef__ParameterizedTypeRef) { subtypeThrowException(ruleName("subtypeTypeTypeRef__ParameterizedTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right), SUBTYPETYPETYPEREF__PARAMETERIZEDTYPEREF, e_applyRuleSubtypeTypeTypeRef__ParameterizedTypeRef, left, right, new ErrorInformation[] {new ErrorInformation(left), new ErrorInformation(right)}); return null; } }
protected Result<TypeRef> thisTypeRefImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ParameterizedTypeRef type) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleThisTypeRefParameterizedTypeRef(G, _subtrace_, type); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("thisTypeRefParameterizedTypeRef") + stringRepForEnv(G) + " |~ " + stringRep(type) + " ~> " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleThisTypeRefParameterizedTypeRef) { thisTypeRefThrowException(ruleName("thisTypeRefParameterizedTypeRef") + stringRepForEnv(G) + " |~ " + stringRep(type) + " ~> " + "BoundThisTypeRef", THISTYPEREFPARAMETERIZEDTYPEREF, e_applyRuleThisTypeRefParameterizedTypeRef, type, new ErrorInformation[] {new ErrorInformation(type)}); return null; } }
protected Result<Boolean> supertypeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TypeRef left, final TypeRef right) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<Boolean> _result_ = applyRuleSupertypeTypeRef(G, _subtrace_, left, right); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("supertypeTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " :> " + stringRep(right); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSupertypeTypeRef) { supertypeThrowException(ruleName("supertypeTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " :> " + stringRep(right), SUPERTYPETYPEREF, e_applyRuleSupertypeTypeRef, left, right, new ErrorInformation[] {new ErrorInformation(left), new ErrorInformation(right)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ShiftExpression e) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeShiftExpression(G, _subtrace_, e); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeShiftExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeShiftExpression) { typeThrowException(ruleName("typeShiftExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "ParameterizedTypeRef", TYPESHIFTEXPRESSION, e_applyRuleTypeShiftExpression, e, new ErrorInformation[] {new ErrorInformation(e)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final RelationalExpression e) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeRelationalExpression(G, _subtrace_, e); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeRelationalExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeRelationalExpression) { typeThrowException(ruleName("typeRelationalExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "ParameterizedTypeRef", TYPERELATIONALEXPRESSION, e_applyRuleTypeRelationalExpression, e, new ErrorInformation[] {new ErrorInformation(e)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final BinaryBitwiseExpression e) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeBinaryBitwiseExpression(G, _subtrace_, e); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeBinaryBitwiseExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeBinaryBitwiseExpression) { typeThrowException(ruleName("typeBinaryBitwiseExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "ParameterizedTypeRef", TYPEBINARYBITWISEEXPRESSION, e_applyRuleTypeBinaryBitwiseExpression, e, new ErrorInformation[] {new ErrorInformation(e)}); return null; } }
protected Result<TypeRef> upperBoundImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ExistentialTypeRef existentialTypeRef) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleUpperBoundExistentialTypeRef(G, _subtrace_, existentialTypeRef); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("upperBoundExistentialTypeRef") + stringRepForEnv(G) + " |~ " + stringRep(existentialTypeRef) + " /\\ " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleUpperBoundExistentialTypeRef) { upperBoundThrowException(ruleName("upperBoundExistentialTypeRef") + stringRepForEnv(G) + " |~ " + stringRep(existentialTypeRef) + " /\\ " + "TypeRef", UPPERBOUNDEXISTENTIALTYPEREF, e_applyRuleUpperBoundExistentialTypeRef, existentialTypeRef, new ErrorInformation[] {new ErrorInformation(existentialTypeRef)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final CastExpression e) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeCastExpression(G, _subtrace_, e); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeCastExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeCastExpression) { typeThrowException(ruleName("typeCastExpression") + stringRepForEnv(G) + " |- " + stringRep(e) + " : " + "TypeRef", TYPECASTEXPRESSION, e_applyRuleTypeCastExpression, e, new ErrorInformation[] {new ErrorInformation(e)}); return null; } }
protected Result<TypeRef> typeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ModuleNamespaceVirtualType t) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleTypeModuleNamespace(G, _subtrace_, t); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("typeModuleNamespace") + stringRepForEnv(G) + " |- " + stringRep(t) + " : " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleTypeModuleNamespace) { typeThrowException(ruleName("typeModuleNamespace") + stringRepForEnv(G) + " |- " + stringRep(t) + " : " + "TypeRef", TYPEMODULENAMESPACE, e_applyRuleTypeModuleNamespace, t, new ErrorInformation[] {new ErrorInformation(t)}); return null; } }
protected Result<Boolean> subtypeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TypeRef left, final TypeRef right) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<Boolean> _result_ = applyRuleSubtypeTypeRef(G, _subtrace_, left, right); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("subtypeTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSubtypeTypeRef) { subtypeThrowException(ruleName("subtypeTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right), SUBTYPETYPEREF, e_applyRuleSubtypeTypeRef, left, right, new ErrorInformation[] {new ErrorInformation(left), new ErrorInformation(right)}); return null; } }
protected Result<Boolean> subtypeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final UnknownTypeRef left, final TypeRef right) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<Boolean> _result_ = applyRuleSubtypeUnknownTypeRef_Left(G, _subtrace_, left, right); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("subtypeUnknownTypeRef_Left") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSubtypeUnknownTypeRef_Left) { subtypeThrowException(ruleName("subtypeUnknownTypeRef_Left") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(right), SUBTYPEUNKNOWNTYPEREF_LEFT, e_applyRuleSubtypeUnknownTypeRef_Left, left, right, new ErrorInformation[] {new ErrorInformation(left), new ErrorInformation(right)}); return null; } }
protected Result<Boolean> subtypeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final ParameterizedTypeRef leftOriginal, final ParameterizedTypeRef rightOriginal) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<Boolean> _result_ = applyRuleSubtypeParameterizedTypeRef(G, _subtrace_, leftOriginal, rightOriginal); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("subtypeParameterizedTypeRef") + stringRepForEnv(G) + " |- " + stringRep(leftOriginal) + " <: " + stringRep(rightOriginal); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSubtypeParameterizedTypeRef) { subtypeThrowException(ruleName("subtypeParameterizedTypeRef") + stringRepForEnv(G) + " |- " + stringRep(leftOriginal) + " <: " + stringRep(rightOriginal), SUBTYPEPARAMETERIZEDTYPEREF, e_applyRuleSubtypeParameterizedTypeRef, leftOriginal, rightOriginal, new ErrorInformation[] {new ErrorInformation(leftOriginal), new ErrorInformation(rightOriginal)}); return null; } }
protected Result<TypeArgument> substTypeVariablesImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final FunctionTypeRef typeRef) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeArgument> _result_ = applyRuleSubstTypeVariablesInFunctionTypeRef(G, _subtrace_, typeRef); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("substTypeVariablesInFunctionTypeRef") + stringRepForEnv(G) + " |- " + stringRep(typeRef) + " ~> " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSubstTypeVariablesInFunctionTypeRef) { substTypeVariablesThrowException(ruleName("substTypeVariablesInFunctionTypeRef") + stringRepForEnv(G) + " |- " + stringRep(typeRef) + " ~> " + "TypeRef", SUBSTTYPEVARIABLESINFUNCTIONTYPEREF, e_applyRuleSubstTypeVariablesInFunctionTypeRef, typeRef, new ErrorInformation[] {new ErrorInformation(typeRef)}); return null; } }
protected Result<TypeRef> upperBoundImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final Wildcard wildcard) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<TypeRef> _result_ = applyRuleUpperBoundWildcardTypeRef(G, _subtrace_, wildcard); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("upperBoundWildcardTypeRef") + stringRepForEnv(G) + " |~ " + stringRep(wildcard) + " /\\ " + stringRep(_result_.getFirst()); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleUpperBoundWildcardTypeRef) { upperBoundThrowException(ruleName("upperBoundWildcardTypeRef") + stringRepForEnv(G) + " |~ " + stringRep(wildcard) + " /\\ " + "TypeRef", UPPERBOUNDWILDCARDTYPEREF, e_applyRuleUpperBoundWildcardTypeRef, wildcard, new ErrorInformation[] {new ErrorInformation(wildcard)}); return null; } }
protected Result<Boolean> subtypeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TypeRef left, final BoundThisTypeRef boundThisTypeRef) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<Boolean> _result_ = applyRuleSubtypeTypeRefBoundThisTypeRef(G, _subtrace_, left, boundThisTypeRef); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("subtypeTypeRefBoundThisTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(boundThisTypeRef); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSubtypeTypeRefBoundThisTypeRef) { subtypeThrowException(ruleName("subtypeTypeRefBoundThisTypeRef") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(boundThisTypeRef), SUBTYPETYPEREFBOUNDTHISTYPEREF, e_applyRuleSubtypeTypeRefBoundThisTypeRef, left, boundThisTypeRef, new ErrorInformation[] {new ErrorInformation(left), new ErrorInformation(boundThisTypeRef)}); return null; } }
protected Result<Boolean> subtypeImpl(final RuleEnvironment G, final RuleApplicationTrace _trace_, final TypeRef left, final ExistentialTypeRef existentialTypeRef) throws RuleFailedException { try { final RuleApplicationTrace _subtrace_ = newTrace(_trace_); final Result<Boolean> _result_ = applyRuleSubtypeExistentialTypeRef_Right(G, _subtrace_, left, existentialTypeRef); addToTrace(_trace_, new Provider<Object>() { public Object get() { return ruleName("subtypeExistentialTypeRef_Right") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(existentialTypeRef); } }); addAsSubtrace(_trace_, _subtrace_); return _result_; } catch (Exception e_applyRuleSubtypeExistentialTypeRef_Right) { subtypeThrowException(ruleName("subtypeExistentialTypeRef_Right") + stringRepForEnv(G) + " |- " + stringRep(left) + " <: " + stringRep(existentialTypeRef), SUBTYPEEXISTENTIALTYPEREF_RIGHT, e_applyRuleSubtypeExistentialTypeRef_Right, left, existentialTypeRef, new ErrorInformation[] {new ErrorInformation(left), new ErrorInformation(existentialTypeRef)}); return null; } }
@Inject public LeadServiceForTests(final DoubleLeadService lead) { super(new Provider<LeadService>() { @Override public LeadService get() { return lead; } }); }
@Inject public SamlProxySamlTransformationErrorExceptionMapper( Provider<HttpServletRequest> contextProvider, EventSinkMessageSender eventSinkMessageSender, LevelLoggerFactory<SamlProxySamlTransformationErrorExceptionMapper> levelLoggerFactory) { super(contextProvider); this.eventSinkMessageSender = eventSinkMessageSender; this.levelLogger = levelLoggerFactory.createLevelLogger(SamlProxySamlTransformationErrorExceptionMapper.class); }
/** * Provides new instances of the ImportedNamesAdapter, e.g. concrete instances of N4JSImportedNamesAdapter. * * @see ImportedNamesAdapter */ public Provider<ImportedNamesAdapter> provideImportedNamesAdapter() { return new Provider<ImportedNamesAdapter>() { @Override public ImportedNamesAdapter get() { return new N4JSImportedNamesAdapter(); } }; }
@SuppressWarnings("unchecked") @Override public <T> Provider scope(Key<T> key, Provider<T> creator) { synchronized(providers) { Provider p = providers.get(key); if (p != null) { return p; } SingletonProvider<T> provider = new SingletonProvider<T>(creator); providers.put(key, provider); return provider; } }
public Provider<? extends InternalPkmntcgoLexer> provideInternalPkmntcgoLexer() { return LexerProvider.create(InternalPkmntcgoLexer.class); }