Package com.googlecode.totallylazy

Examples of com.googlecode.totallylazy.multi


public class ValueRenderer {

    @multimethod
    public static String renderValue(Object value) {
        return new multi() {
        }.<String>methodOption(value)
                .getOrElse(String.valueOf(value));
    }
View Full Code Here


public class TypeRenderer {

    @multimethod
    public static String renderType(Type type) {
        Type extractedType = extractType(type);
        return new multi() {
        }.<String>methodOption(extractedType)
                .getOrElse(extractedType.toString());
    }
View Full Code Here

import static java.lang.String.format;

public class MethodNameRenderer {
    @multimethod
    public static String renderMethodName(Expression expression) {
        return new multi() {
        }.<String>methodOption(expression)
                .getOrThrow(new IllegalArgumentException(expression + " not mapped"));
    }
View Full Code Here

    public static final String EXPRESSION_TOKEN = "$JAVAREPL_EXPRESSION_TOKEN$";
    public static final String EXPRESSION_VALUE = "$JAVAREPL_EXPRESSION_VALUE$";

    @multimethod
    public static String renderExpressionToken(Expression expression) {
        return new multi() {
        }.<String>methodOption(expression)
                .getOrThrow(new IllegalArgumentException(expression + " not mapped"));
    }
View Full Code Here

import javarepl.expressions.*;

public class ExpressionSourceRenderer {
    @multimethod
    public static String renderExpressionSource(Expression expression) {
        return new multi() {
        }.<String>methodOption(expression)
                .getOrThrow(new IllegalArgumentException(expression + " not mapped"));
    }
View Full Code Here

import static javarepl.rendering.TypeRenderer.renderType;

public class EvaluationClassRenderer {
    @multimethod
    public static String renderExpressionClass(EvaluationContext context, String className, Expression expression) {
        return new multi() {
        }.<String>methodOption(context, className, expression)
                .getOrThrow(new IllegalArgumentException(expression + " not mapped"));
    }
View Full Code Here

TOP

Related Classes of com.googlecode.totallylazy.multi

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.