Package org.gradle.api

Examples of org.gradle.api.InvalidUserCodeException


        ModuleIdentifier moduleIdentifier;

        try {
            moduleIdentifier = moduleIdentifierNotationParser.parseNotation(id);
        } catch (UnsupportedNotationException e) {
            throw new InvalidUserCodeException(String.format(INVALID_SPEC_ERROR, id == null ? "null" : id.toString()), e);
        }

        Spec<ComponentMetadataDetails> spec = new ComponentMetadataDetailsMatchingSpec(moduleIdentifier);
        return new SpecRuleAction<ComponentMetadataDetails>(ruleAction, spec);
    }
View Full Code Here


        }

        try {
            specRuleAction.getAction().execute(details, inputs);
        } catch (Exception e) {
            throw new InvalidUserCodeException(USER_CODE_ERROR, e);
        }
    }
View Full Code Here

    public RuleAction<? super T> createFromClosure(Class<T> subjectType, Closure<?> closure) {
        try {
            return ruleActionValidator.validate(new ClosureBackedRuleAction<T>(subjectType, closure));
        } catch (RuleActionValidationException e) {
            throw new InvalidUserCodeException(String.format(INVALID_CLOSURE_ERROR, context), e);
        }
    }
View Full Code Here

    public RuleAction<? super T> createFromAction(Action<? super T> action) {
        try {
            return ruleActionValidator.validate(new NoInputsRuleAction<T>(action));
        } catch (RuleActionValidationException e) {
            throw new InvalidUserCodeException(String.format(INVALID_ACTION_ERROR, context), e);
        }
    }
View Full Code Here

    public RuleAction<? super T> createFromRuleSource(Class<T> subjectType, Object ruleSource) {
        try {
            return ruleActionValidator.validate(RuleSourceBackedRuleAction.create(ModelType.of(subjectType), ruleSource));
        } catch (RuleActionValidationException e) {
            throw new InvalidUserCodeException(String.format(INVALID_RULE_SOURCE_ERROR, context), e);
        }
    }
View Full Code Here

    public void execute(T target) {
        try {
            delegate.execute(target);
        } catch (Exception e) {
            throw new InvalidUserCodeException(exceptionMessage, e);
        }
    }
View Full Code Here

        }

        try {
            rule.getAction().execute(selection, inputValues);
        } catch (Exception e) {
            throw new InvalidUserCodeException(USER_CODE_ERROR, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.gradle.api.InvalidUserCodeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.