Examples of IJavaClassType


Examples of org.eclipse.jdt.debug.core.IJavaClassType

    return classType;
  }

  public String resolve(String method, IValue value) {
    String resolvedString = null;
    IJavaClassType classType;
    try {
      classType = this.getIJavaClassType(value);
      JavaLogicalStructure countJavaLogicalStructure = new JavaLogicalStructure(classType.getName(), true, method, "bla", new String[0][0]);
      IValue resolvedValue = countJavaLogicalStructure.getLogicalStructure(value);
      resolvedString = resolvedValue.getValueString();
    } catch (DebugException e) {
      Activator.getDefault().log(e);
    } catch (CoreException e) {
View Full Code Here

Examples of org.eclipse.jdt.debug.core.IJavaClassType

    return this.resolve(method, this.getParentValue());
  }

  public String[] resolveNSArrayToKeys(String method) {
    String[] resolvedArrayToKeys = new String[0];
    IJavaClassType classType;
    try {
      classType = this.getIJavaClassType(this.getParentValue());
      JavaLogicalStructure attributeKeysJavaLogicalStructure = new JavaLogicalStructure(classType.getName(), true, method, "bla", new String[0][0]);
      IValue attributeKeysResolvedValue = attributeKeysJavaLogicalStructure.getLogicalStructure(this.getParentValue());
      NSArrayLogicalStructureType arrayLogicalStructureType = new NSArrayLogicalStructureType(attributeKeysResolvedValue);
      resolvedArrayToKeys = arrayLogicalStructureType.resolveObjects();
    } catch (DebugException e) {
      Activator.getDefault().log(e);
View Full Code Here

Examples of org.eclipse.jdt.debug.core.IJavaClassType

  public abstract String[] getMethodNames();

  public IValue getLogicalStructure(IValue value) throws CoreException {
    String[] coolMethods = this.getMethodNames();
    int length = coolMethods.length;
    IJavaClassType classType = this.getIJavaClassType(value);
    String[][] variablesAndMethods = new String[length][2];
    int offset = 0;
    this.appendMethodsToVariablesAndMethodsArray(offset, coolMethods, null, variablesAndMethods);
    offset = offset + coolMethods.length;
    JavaLogicalStructure javaLogicalStructure = new JavaLogicalStructure(classType.getName(), true, null, "bla", variablesAndMethods);
    IValue resolvedValue = javaLogicalStructure.getLogicalStructure(value);
    return resolvedValue;
  }
View Full Code Here

Examples of org.eclipse.jdt.debug.core.IJavaClassType

        try {
            IJavaType type= javaValue.getJavaType();
            if (!(type instanceof IJavaClassType)) {
                return false;
            }
            IJavaClassType classType = (IJavaClassType) type;
            IJavaInterfaceType[] interfaceTypes = classType.getAllInterfaces();
            for ( int i = 0; i < interfaceTypes.length; i++ ) {
                if ("org.jbpm.process.instance.ProcessInstance".equals(interfaceTypes[i].getName())) {
                    return true;
                }
            }
View Full Code Here

Examples of org.eclipse.jdt.debug.core.IJavaClassType

   * @exception DebugException
   *                if creation fails
   */
  protected IJavaObject newInstance(String className) throws DebugException {
    IJavaObject object = null;
    IJavaClassType clazz = null;
    IJavaType[] types = getDebugTarget().getJavaTypes(className);
    if (types != null && types.length > 0) {
      clazz = (IJavaClassType) types[0];
    }
    if (clazz == null) {
      // The class is not loaded on the target VM.
      // Force the load of the class.
      types = getDebugTarget().getJavaTypes("java.lang.Class"); //$NON-NLS-1$
      IJavaClassType classClass = null;
      if (types != null && types.length > 0) {
        classClass = (IJavaClassType) types[0];
      }
      if (classClass == null) {
        // unable to load the class
        throw new DebugException(
            new Status(
                IStatus.ERROR,
                JDIDebugModel.getPluginIdentifier(),
                DebugException.REQUEST_FAILED,
                EvaluationMessages.LocalEvaluationEngine_Evaluation_failed___unable_to_instantiate_code_snippet_class__11,
                null));
      }
      IJavaValue[] args = new IJavaValue[] { getDebugTarget().newValue(
          className) };
      IJavaObject classObject = (IJavaObject) classClass
          .sendMessage(
              "forName", "(Ljava/lang/String;)Ljava/lang/Class;", args, getThread()); //$NON-NLS-2$ //$NON-NLS-1$
      object = (IJavaObject) classObject
          .sendMessage(
              "newInstance", "()Ljava/lang/Object;", null, getThread(), false); //$NON-NLS-2$ //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jdt.debug.core.IJavaClassType

    IJavaValue[] args = new IJavaValue[fArgCount];
    // args are in reverse order
    for (int i = fArgCount - 1; i >= 0; i--) {
      args[i] = popValue();
    }
    IJavaClassType clazz = (IJavaClassType) pop();
    IJavaValue result = clazz.newInstance(fSignature, args, getContext()
        .getThread());
    push(result);
  }
View Full Code Here

Examples of org.eclipse.jdt.debug.core.IJavaClassType

    try {
      IJavaType type = value.getJavaType();
      if (!(type instanceof IJavaClassType)) {
        return null;
      }
      IJavaClassType classType = (IJavaClassType) type;
      if (classType.getName().equals(fType)) {
        // found the type
        return classType;
      }
      if (!fSubtypes) {
        // if not checking the subtypes, stop here
        return null;
      }
      IJavaClassType superClass = classType.getSuperclass();
      while (superClass != null) {
        if (superClass.getName().equals(fType)) {
          // found the type, it's a super class
          return superClass;
        }
        superClass = superClass.getSuperclass();
      }
      IJavaInterfaceType[] superInterfaces = classType.getAllInterfaces();
      for (IJavaInterfaceType superInterface : superInterfaces) {
        if (superInterface.getName().equals(fType)) {
          // found the type, it's a super interface
View Full Code Here

Examples of org.eclipse.jdt.debug.core.IJavaClassType

    try {
      IJavaType type = javaValue.getJavaType();
      if (!(type instanceof IJavaClassType)) {
        return new ILogicalStructureType[0];
      }
      IJavaClassType classType = (IJavaClassType) type;
      List<JavaLogicalStructure> list = fJavaLogicalStructureMap
          .get(classType.getName());
      if (list != null) {
        logicalStructures.addAll(list);
      }
      IJavaClassType superClass = classType.getSuperclass();
      while (superClass != null) {
        addIfIsSubtype(logicalStructures,
            fJavaLogicalStructureMap.get(superClass
                .getName()));
        superClass = superClass.getSuperclass();
      }
      IJavaInterfaceType[] superInterfaces = classType.getAllInterfaces();
      for (IJavaInterfaceType superInterface : superInterfaces) {
        addIfIsSubtype(logicalStructures,
            fJavaLogicalStructureMap.get(superInterface
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.