Beispiel #1
0
 public Value valueCurrent() {
   if (object == null) {
     return refType.getValue(field());
   } else {
     return object.getValue(field());
   }
 }
Beispiel #2
0
  void validateConstructorInvocation(Method method)
      throws InvalidTypeException, InvocationException {
    /*
     * Method must be in this class.
     */
    ReferenceTypeImpl declType = (ReferenceTypeImpl) method.declaringType();
    if (!declType.equals(this)) {
      throw new IllegalArgumentException("Invalid constructor");
    }

    /*
     * Method must be a constructor
     */
    if (!method.isConstructor()) {
      throw new IllegalArgumentException("Cannot create instance with non-constructor");
    }
  }
Beispiel #3
0
  void validateMethodInvocation(Method method) throws InvalidTypeException, InvocationException {
    /*
     * Method must be in this class or a superclass.
     */
    ReferenceTypeImpl declType = (ReferenceTypeImpl) method.declaringType();
    if (!declType.isAssignableFrom(this)) {
      throw new IllegalArgumentException("Invalid method");
    }

    /*
     * Method must be a static and not a static initializer
     */
    if (!method.isStatic()) {
      throw new IllegalArgumentException("Cannot invoke instance method on a class type");
    } else if (method.isStaticInitializer()) {
      throw new IllegalArgumentException("Cannot invoke static initializer");
    }
  }
 public Type findType(String signature) throws ClassNotLoadedException {
   ReferenceTypeImpl enclosing = (ReferenceTypeImpl) method.declaringType();
   return enclosing.findType(signature);
 }
Beispiel #5
0
 public Field field() {
   if (field == null) {
     field = refType.getFieldMirror(fieldID);
   }
   return field;
 }
Beispiel #6
0
 ClassPrepareEventImpl(JDWP.Event.Composite.Events.ClassPrepare evt) {
   super(evt, evt.requestID, evt.thread);
   referenceType = this.vm.referenceType(evt.typeID, evt.refTypeTag, evt.signature);
   ((ReferenceTypeImpl) referenceType).setStatus(evt.status);
 }