Package com.sun.jdi

Examples of com.sun.jdi.Method


  public void forceReturn(IJavaValue value) throws DebugException {
    if (isTopStackFrame()) {
      fThread.forceReturn(value);
    } else {
      // first check assignment compatible
      Method method = getUnderlyingMethod();
      try {
        ValueImpl.checkValue(((JDIValue) value).getUnderlyingValue(),
            method.returnType(),
            (VirtualMachineImpl) method.virtualMachine());
      } catch (InvalidTypeException e) {
        targetRequestFailed(JDIDebugModelMessages.JDIStackFrame_26, e);
      } catch (ClassNotLoadedException e) {
        targetRequestFailed(JDIDebugModelMessages.JDIThread_48, e);
      }
View Full Code Here


   * Add methods to a set of methods if they are not overridden, add new
   * names+signature combinations to set of names+signature combinations.
   */
  private void addVisibleMethods(List<Method> inheritedMethods, Set<String> nameAndSignatures, List<Method> resultMethods) {
    Iterator<Method> iter = inheritedMethods.iterator();
    Method inheritedMethod;
    while (iter.hasNext()) {
      inheritedMethod = iter.next();
      if (!nameAndSignatures.contains(inheritedMethod.name()
          + inheritedMethod.signature())) {
        resultMethods.add(inheritedMethod);
      }
    }
  }
View Full Code Here

   */
  public List<Method> methodsByName(String name) {
    List<Method> elements = new ArrayList<Method>();
    Iterator<Method> iter = visibleMethods().iterator();
    while (iter.hasNext()) {
      Method method = iter.next();
      if (method.name().equals(name)) {
        elements.add(method);
      }
    }
    return elements;
  }
View Full Code Here

      IJavaThread thread) throws DebugException {
    if (getUnderlyingType() instanceof ClassType) {
      ClassType clazz = (ClassType) getUnderlyingType();
      JDIThread javaThread = (JDIThread) thread;
      List<Value> arguments = convertArguments(args);
      Method method = null;
      try {
        List<Method> methods = clazz.methodsByName("<init>", signature); //$NON-NLS-1$
        if (methods.isEmpty()) {
          requestFailed(
              MessageFormat.format(
View Full Code Here

      IJavaValue[] args, IJavaThread thread) throws DebugException {
    if (getUnderlyingType() instanceof ClassType) {
      ClassType clazz = (ClassType) getUnderlyingType();
      JDIThread javaThread = (JDIThread) thread;
      List<Value> arguments = convertArguments(args);
      Method method = null;
      try {
        List<Method> methods = clazz.methodsByName(selector, signature);
        if (methods.isEmpty()) {
          requestFailed(
              MessageFormat.format(
View Full Code Here

      for (IJavaValue arg : args) {
        arguments.add(((JDIValue) arg).getUnderlyingValue());
      }
    }
    ObjectReference object = getUnderlyingObject();
    Method method = null;
    ReferenceType refType = getUnderlyingReferenceType();
    try {
      if (superSend) {
        // begin lookup in superclass
        refType = ((ClassType) refType).superclass();
View Full Code Here

      for (IJavaValue arg : args) {
        arguments.add(((JDIValue) arg).getUnderlyingValue());
      }
    }
    ObjectReference object = getUnderlyingObject();
    Method method = null;
    ReferenceType refType = getUnderlyingReferenceType();
    try {
      while (typeSignature != null && refType != null  && !refType.signature().equals(typeSignature)) {
        // lookup correct type through the hierarchy
        refType = ((ClassType) refType).superclass();
View Full Code Here

TOP

Related Classes of com.sun.jdi.Method

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.