Package com.sun.jdi

Examples of com.sun.jdi.Value.type()


 
  public static String reftype(String expXmlStr) {
    List<Expression> exps = Expression.parseExpXmlStr(expXmlStr);
    if (exps ==null || exps.size() == 0) return "";
    Value value = getJdiValue(exps.get(0));
    return value.type().name();
  }

  public static String inspect(String expXmlStr) {
    List<Expression> exps = Expression.parseExpXmlStr(expXmlStr);
    if (exps ==null || exps.size() == 0) return "";
View Full Code Here


    Value value = getJdiValue(exp);
   
    StringBuilder sb = new StringBuilder();
    if (value instanceof ObjectReference) {
      sb.append(exp.getOriExp()).append(" = ");
      sb.append(value.type().name()).append("\n");
     
      ObjectReference objRef = (ObjectReference) value;
      Map<Field, Value> values = objRef.getValues(objRef.referenceType().visibleFields());
      List<String> fieldNames = new ArrayList<String>();
      for (Field field : values.keySet()) {
View Full Code Here

      Value value = (Value) valIter.next();
      if (value == null) {
        if (isPrimitiveType(argType.name()))
          return false;
      }
      if (!value.type().equals(argType)) {
        if (isAssignableTo(value.type(), argType)) {
          return true;
        } else {
          return false;
        }
View Full Code Here

      if (value == null) {
        if (isPrimitiveType(argType.name()))
          return false;
      }
      if (!value.type().equals(argType)) {
        if (isAssignableTo(value.type(), argType)) {
          return true;
        } else {
          return false;
        }
      }
View Full Code Here

    ParseResult result = AstTreeFactory.getExpressionAst(exp);
    if (result.hasError()) {
      return result.getErrorMsg();
    }
    Value value = (Value)evalTreeNode(result.getTree());
    return value.type().name();
  }

  public static String inspect(String exp) {
    ParseResult result = AstTreeFactory.getExpressionAst(exp);
    if (result.hasError()) {
View Full Code Here

    Value value = (Value)evalTreeNode(result.getTree());
   
    StringBuilder sb = new StringBuilder();
    if (value instanceof ObjectReference) {
      sb.append(exp).append(" = ");
      sb.append(value.type().name()).append("\n");
     
      ObjectReference objRef = (ObjectReference) value;
      Map<Field, Value> values = objRef.getValues(objRef.referenceType().visibleFields());
      List<String> fieldNames = new ArrayList<String>();
      for (Field field : values.keySet()) {
View Full Code Here

      Value value = (Value) valIter.next();
      if (value == null) {
        if (isPrimitiveType(argType.name()))
          return false;
      }
      if (!value.type().equals(argType)) {
        if (isAssignableTo(value.type(), argType)) {
          return true;
        } else {
          return false;
        }
View Full Code Here

      if (value == null) {
        if (isPrimitiveType(argType.name()))
          return false;
      }
      if (!value.type().equals(argType)) {
        if (isAssignableTo(value.type(), argType)) {
          return true;
        } else {
          return false;
        }
      }
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.