Examples of MethodKey


Examples of org.codehaus.groovy.runtime.MethodKey

        final boolean inited = this.initCalled;
        performOperationOnMetaClass(new Callable() {
            public void call() {
                String methodName = metaMethod.getName();
                checkIfGroovyObjectMethod(metaMethod);
                MethodKey key = new DefaultCachedMethodKey(theClass, methodName, metaMethod.getParameterTypes(), false);

                if (isInitialized()) {
                    throw new RuntimeException("Already initialized, cannot add new method: " + metaMethod);
                }
                // we always adds meta methods to class itself
View Full Code Here

Examples of org.codehaus.groovy.runtime.MethodKey

                    invokeStaticMethodMethod = metaMethod;
                } else {
                    if (methodName.equals(METHOD_MISSING)) {
                        methodName = STATIC_METHOD_MISSING;
                    }
                    MethodKey key = new DefaultCachedMethodKey(theClass, methodName, metaMethod.getParameterTypes(), false);

                    addMetaMethod(metaMethod);
                    dropStaticMethodCache(methodName);
//                    cacheStaticMethod(key,metaMethod);
View Full Code Here

Examples of org.codehaus.groovy.runtime.MethodKey

                    String name = metaMethodFromSuper.getName();
                    final Class declaringClass = metaMethodFromSuper.getDeclaringClass().getTheClass();
                    ClosureMetaMethod localMethod = ClosureMetaMethod.copy(closureMethod);
                    addMetaMethod(localMethod);

                    MethodKey key = new DefaultCachedMethodKey(declaringClass, name, localMethod.getParameterTypes(), false);

                    checkIfGroovyObjectMethod(localMethod);
                    expandoMethods.put(key, localMethod);

                }
View Full Code Here

Examples of org.codehaus.groovy.runtime.MethodKey

                Class type = newValue == null ? Object.class : newValue.getClass();

                MetaBeanProperty mbp = newValue instanceof MetaBeanProperty ? (MetaBeanProperty) newValue : new ThreadManagedMetaBeanProperty(theClass, property, type, newValue);

                final MetaMethod getter = mbp.getGetter();
                final MethodKey getterKey = new DefaultCachedMethodKey(theClass, getter.getName(), CachedClass.EMPTY_ARRAY, false);
                final MetaMethod setter = mbp.getSetter();
                final MethodKey setterKey = new DefaultCachedMethodKey(theClass, setter.getName(), setter.getParameterTypes(), false);
                addMetaMethod(getter);
                addMetaMethod(setter);

                expandoMethods.put(setterKey, setter);
                expandoMethods.put(getterKey, getter);
View Full Code Here

Examples of org.jabsorb.reflect.MethodKey

  {
    Iterator i = methodMap.entrySet().iterator();
    while (i.hasNext())
    {
      Map.Entry mentry = (Map.Entry) i.next();
      MethodKey mk = (MethodKey) mentry.getKey();
      m.add(prefix + mk.getMethodName());
    }
  }
View Full Code Here

Examples of org.jabsorb.reflect.MethodKey

    // first, match soley by the method name and number of arguments passed in
    // if there is a single match, return the single match
    // if there is no match at all, return null
    // if there are multiple matches, fall through to the second matching phase
    // below
    MethodKey mk = new MethodKey(methodName, arguments.length());
    Object o = methodMap.get(mk);
    if (o instanceof Method)
    {
      Method m = (Method) o;
      if (log.isDebugEnabled())
View Full Code Here

Examples of org.shiftone.jrat.core.MethodKey

    String result;
    if (treeNode.isRootNode()) {
      result = "Root";
    } else {
      MethodKey methodKey = treeNode.getMethodKey();
      String methodName = methodKey.getMethodName();
      if (treeNode.isChildOfRootNode()) {
        Float avg = treeNode.getAverageDurationNanos();
        result = methodName
            + ((avg == null) ? " - never exited"
                : (" - " + msDecimalFormat.format(treeNode.getAverageDuration(TimeUnit.MS))));
View Full Code Here

Examples of org.shiftone.jrat.core.MethodKey

    g.setColor(color);
    g.fill3DRect(x, y, width, height, true);
    // print the text on the node
    Graphics gg = g.create(x, y, width, height);
    gg.setColor(Color.BLACK);
    MethodKey methodKey = node.getMethodKey();
    String text = methodKey.getClassName() + "." + methodKey.getMethodName() + " "
        + pctDecimalFormat.format(node.getPctOfAvgRootDuration());
    Rectangle2D stringBounds = metrics.getStringBounds(text, g);
    if (stringBounds.getWidth() < width) {
      gg.drawString(text, (int) (width / 2 - stringBounds.getWidth() / 2), (int) (stringBounds.getHeight()));
    } else {
      text = methodKey.getMethodName() + " " + pctDecimalFormat.format(node.getPctOfAvgParentDuration());
      stringBounds = metrics.getStringBounds(text, g);
      if (stringBounds.getWidth() < width) {
        gg.drawString(text, (int) (width / 2 - stringBounds.getWidth() / 2), (int) (stringBounds.getHeight()));
      }
    }
View Full Code Here

Examples of org.shiftone.jrat.core.MethodKey

  public void populateTable(StackTreeNode nodeModel, Map map) {

    if (!nodeModel.isRootNode()) {
      //
      MethodKey methodKey = nodeModel.getMethodKey();
      MethodKeyAccumulator accumulator = (MethodKeyAccumulator) map.get(methodKey);
      if (accumulator == null) {
        accumulator = new MethodKeyAccumulator(methodKey);
        map.put(methodKey, accumulator);
      }
View Full Code Here

Examples of org.shiftone.jrat.core.MethodKey

  private StackTreeNode currentNode = root;

  public void startElement(String qName, Properties atts) throws Exception {

    if ("call".equals(qName)) {
      MethodKey methodKey = new MethodKey(atts.getProperty("c"), atts.getProperty("m"), atts.getProperty("s"));
      currentNode = (StackTreeNode) currentNode.getChild(methodKey);
      String minString = atts.getProperty("min");
      String maxString = atts.getProperty("max");
      long min = (minString != null) ? Long.parseLong(minString) : 0;
      long max = (maxString != null) ? Long.parseLong(maxString) : 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.