Klasse EvaluationResult

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.eval.EvaluationResult

public class EvaluationResult extends Object
An EvaluationResult is the result of a code snippet evaluation, a global variable evaluation or it is used to report problems against imports and package declaration. It primarily contains the representation of the resulting value (e.g. its toString() representation). However if the code snippet, a global variable definition, an import or the package declaration could not be compiled, it contains the corresponding compilation problems.
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final int
    The evaluation result contains the value of a code snippet or it reports a problem on a code snippet.
    static final int
    The evaluation result reports a problem on an import declaration.
    static final int
    The evaluation result reports an internal problem.
    static final int
    The evaluation result reports a problem on a package declaration.
    static final int
    The evaluation result contains the value of a variable or it reports a problem on a variable.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    EvaluationResult(char[] evaluationID, int evaluationType, char[] displayString, char[] typeName)
     
    EvaluationResult(char[] evaluationID, int evaluationType, CategorizedProblem[] problems)
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    char[]
    Returns the ID of the evaluation.
    int
    Returns the type of evaluation this result is about.
    Returns an array of problems (errors and warnings) encountered during the compilation of a code snippet or a global variable definition, or during the analysis of a package name or an import.
    Returns a proxy object on this result's value.
    char[]
    Returns the displayable representation of this result's value.
    char[]
    Returns the dot-separated fully qualified name of this result's value type.
    boolean
    Returns whether there are errors in the code snippet or the global variable definition.
    boolean
    Returns whether there are problems in the code snippet or the global variable definition.
    boolean
    Returns whether this result has a value.
    boolean
    Returns whether there are warnings in the code snippet or the global variable definition.
    Returns a readable representation of this result.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Felddetails

    • T_VARIABLE

      public static final int T_VARIABLE
      The evaluation result contains the value of a variable or it reports a problem on a variable. Note that if the problem is on the type of the variable, the source line number is -1. If the problem is on the name of the variable, the source line number is 0. Otherwise the source line number is relative to the initializer code.
      Siehe auch:
    • T_CODE_SNIPPET

      public static final int T_CODE_SNIPPET
      The evaluation result contains the value of a code snippet or it reports a problem on a code snippet.
      Siehe auch:
    • T_IMPORT

      public static final int T_IMPORT
      The evaluation result reports a problem on an import declaration.
      Siehe auch:
    • T_PACKAGE

      public static final int T_PACKAGE
      The evaluation result reports a problem on a package declaration.
      Siehe auch:
    • T_INTERNAL

      public static final int T_INTERNAL
      The evaluation result reports an internal problem.
      Siehe auch:
  • Konstruktordetails

    • EvaluationResult

      public EvaluationResult(char[] evaluationID, int evaluationType, char[] displayString, char[] typeName)
    • EvaluationResult

      public EvaluationResult(char[] evaluationID, int evaluationType, CategorizedProblem[] problems)
  • Methodendetails

    • getEvaluationID

      public char[] getEvaluationID()
      Returns the ID of the evaluation. If the result is about a global variable, returns the name of the variable. If the result is about a code snippet, returns the code snippet. If the result is about an import, returns the import. If the result is about a package declaration, returns the package declaration.
    • getEvaluationType

      public int getEvaluationType()
      Returns the type of evaluation this result is about. This indicates if the result is about a global variable, a code snippet, an import or a package declaration. Use getEvaluationID() to get the object itself.
    • getProblems

      public CategorizedProblem[] getProblems()
      Returns an array of problems (errors and warnings) encountered during the compilation of a code snippet or a global variable definition, or during the analysis of a package name or an import. Returns an empty array if there are no problems.
    • getValue

      public Object getValue()
      Returns a proxy object on this result's value. Returns null if the result's value is null. The returned value is undefined if there is no result. The proxy object is expected to answer questions like: - What is the proxy type for this object? - What is the toString() representation for this object? - What are the field names of this object? - What is the value for a given field name? Special proxy objects are expected if the value is a primitive type.
    • getValueDisplayString

      public char[] getValueDisplayString()
      Returns the displayable representation of this result's value. This is obtained by sending toString() to the result object on the target side if it is not a primitive value. If it is a primitive value, the corresponding static toString(...) is used, e.g. Integer.toString(int n) if it is an int. Returns null if there is no value.
    • getValueTypeName

      public char[] getValueTypeName()
      Returns the dot-separated fully qualified name of this result's value type. If the value is a primitive value, returns the toString() representation of its type (e.g. "int", "boolean", etc.) Returns null if there is no value.
    • hasErrors

      public boolean hasErrors()
      Returns whether there are errors in the code snippet or the global variable definition.
    • hasProblems

      public boolean hasProblems()
      Returns whether there are problems in the code snippet or the global variable definition.
    • hasValue

      public boolean hasValue()
      Returns whether this result has a value.
    • hasWarnings

      public boolean hasWarnings()
      Returns whether there are warnings in the code snippet or the global variable definition.
    • toString

      public String toString()
      Returns a readable representation of this result. This is for debugging purpose only.
      Setzt außer Kraft:
      toString in Klasse Object