01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.debug.eval;
11:
12: import org.eclipse.jdt.core.dom.Message;
13:
14: /**
15: * A compiled expression can be compiled once and evaluated multiple times
16: * in a runtime context.
17: * <p>
18: * Clients are not intended to implement this interface.
19: * </p>
20: * @see org.eclipse.jdt.debug.eval.IAstEvaluationEngine
21: * @since 2.0
22: */
23:
24: public interface ICompiledExpression {
25:
26: /**
27: * Returns the source snippet from which this compiled expression was created.
28: *
29: * @return the source snippet from which this compiled expression was created
30: */
31: public String getSnippet();
32:
33: /**
34: * Returns whether this compiled expression has any compilation errors.
35: *
36: * @return whether this compiled expression has any compilation errors
37: */
38: public boolean hasErrors();
39:
40: /**
41: * Returns any errors which occurred while creating this compiled expression.
42: *
43: * @return any errors which occurred while creating this compiled expression
44: * @deprecated use getErrorMessages()
45: */
46: public Message[] getErrors();
47:
48: /**
49: * Returns an array of problem messages. Each message describes a problem that
50: * occurred while while creating this compiled expression.
51: *
52: * @return error messages, or an empty array if no errors occurred
53: * @since 2.1
54: */
55: public String[] getErrorMessages();
56:
57: }
|