2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.corext.template;
10 public abstract class TemplateVariable {
12 /** name of the variable */
13 private final String fName;
15 /** description of the variable */
16 private final String fDescription;
19 * Creates an instance of <code>TemplateVariable</code>.
21 * @param name the name of the variable
22 * @param description the description for the variable
24 protected TemplateVariable(String name, String description) {
26 fDescription= description;
30 * Returns the name of the variable.
32 public String getName() {
37 * Returns the description for the variable.
39 public String getDescription() {
44 * Tests if this variable can be evaluated.
46 // public abstract boolean canEvaluate(TemplateContext context);
49 * Evaluates this variable
51 * @return the evaluated string, or <code>null</code> if not evaluatable.
53 public abstract String evaluate(TemplateContext context);
56 * Returns whether this variable is resolved.
57 * By default, the variable is not resolved.
58 * Clients can overwrite this method to force resolution of the variable.
60 public boolean isResolved(TemplateContext context) {