Package com.stuffwithstuff.magpie.interpreter

Examples of com.stuffwithstuff.magpie.interpreter.DocBuilder


        //
        // showDoc(method is String)
        //   Displays the documentation for the multimethod with the given name.
        // showDoc(class is Class)
        //   Displays the documentation for the given class.
        System.out.println(new DocBuilder().append(name, multimethod).toString());
      }
     
      return context.nothing();
    }
View Full Code Here


  private static abstract class Methods implements Intrinsic {
    public Obj invoke(final Context context, Obj left, Obj right) {
    
      final Obj matchingValue = getMatchingValueFromArgs(context, left, right);

      DocBuilder docBuilder = new DocBuilder() {

        @Override
        protected boolean shouldDisplayMethod(Callable callable) {
          return isMatchingMethod(matchingValue, context, callable);
        }
      };

      for(Entry<String, Multimethod> multimethod : findMultimethods(context, matchingValue)) {
        docBuilder.append(multimethod.getKey(), multimethod.getValue());
        docBuilder.append("\n");
      }
      System.out.println(docBuilder.toString());
     
      return context.nothing();
    }
View Full Code Here

TOP

Related Classes of com.stuffwithstuff.magpie.interpreter.DocBuilder

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.