com.sap.ide.tools.core.patternfwk
Class DefaultSourcePatternResult

java.lang.Object
  |
  +--com.sap.ide.tools.core.patternfwk.DefaultSourcePatternResult
All Implemented Interfaces:
ISourcePatternResult, ISourcePatternTemplateHelper

public class DefaultSourcePatternResult
extends java.lang.Object
implements ISourcePatternResult

This class is the default implementation for com.sap.ide.tools.core.patternfwk.ISourcePatternResult. It provides information about the generation results of the source pattern. This class is intended to be directly used or subclassed.


Constructor Summary
DefaultSourcePatternResult()
          Creates a new DefaultSourcePatternResult instance and initializes its data.
 
Method Summary
 void addImport(java.lang.String className)
          This method adds an import to the list of import statements to insert into the source code.
 java.lang.String getCoding()
          This method returns the source code fragment of the source pattern.
 java.lang.String[] getImports()
          This method returns the list of import statements to insert into the source code.
 void removeImport(java.lang.String className)
          This method removes an import from the list of import statements to insert into the source code.
 void setCoding(java.lang.String coding)
          This method sets the source code fragment of the source pattern.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSourcePatternResult

public DefaultSourcePatternResult()
Creates a new DefaultSourcePatternResult instance and initializes its data.
Method Detail

getCoding

public java.lang.String getCoding()
This method returns the source code fragment of the source pattern. In case a Velocity template is being used for the code generation the return value of this method may not be valid.
Specified by:
getCoding in interface ISourcePatternResult
Returns:
The source pattern coding fragment as a java.lang.String.

setCoding

public void setCoding(java.lang.String coding)
This method sets the source code fragment of the source pattern. In case a Velocity template is being used for the code generation this method needs not be called.
Specified by:
setCoding in interface ISourcePatternResult
Parameters:
coding - The source pattern coding fragment as a java.lang.String.

addImport

public void addImport(java.lang.String className)
This method adds an import to the list of import statements to insert into the source code.
Specified by:
addImport in interface ISourcePatternTemplateHelper
Parameters:
className - The fully qualified class name of the class or package to import (e.g. "java.util.Vector" or "java.util.*").

removeImport

public void removeImport(java.lang.String className)
This method removes an import from the list of import statements to insert into the source code.
Specified by:
removeImport in interface ISourcePatternTemplateHelper
Parameters:
className - The fully qualified class name of the class or package not to import (e.g. "java.util.Vector" or "java.util.*").

getImports

public java.lang.String[] getImports()
This method returns the list of import statements to insert into the source code.
Specified by:
getImports in interface ISourcePatternTemplateHelper
Returns:
The fully qualified class names of the classes or packages to import as an array of java.lang.String (e.g. "java.util.Vector" or "java.util.*").


Copyright © 2005 SAP AG. All Rights Reserved.