jcreek.representation.constraints
Class DJavaAdapter

java.lang.Object
  extended byjcreek.representation.constraints.DJavaAdapter

public class DJavaAdapter
extends java.lang.Object

Adapter used as an interface to the DynamicJava source interpreter DynamicJava is distributed under the following license:

DynamicJava - Copyright © 1999 Dyade

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DYADE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author:
Martin Stige

Constructor Summary
DJavaAdapter(Entity entity)
          Creates a new instance of DJavaAdapter
 
Method Summary
 void add(java.lang.String str)
          Add to the end of the script string
 java.lang.String checkSyntax(java.lang.String scr)
          Performes a syntax check on the source code in the string
 java.lang.String testSyntax(java.lang.String scr)
           
 ConstraintCheckResult validate(java.lang.String scr)
          Performes a constraint check.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DJavaAdapter

public DJavaAdapter(Entity entity)
Creates a new instance of DJavaAdapter

Parameters:
entity - the entity that are subject to constraint checking
Method Detail

validate

public ConstraintCheckResult validate(java.lang.String scr)
Performes a constraint check. The constraint is described as java source code in a text string

Parameters:
scr - the source code

checkSyntax

public java.lang.String checkSyntax(java.lang.String scr)
Performes a syntax check on the source code in the string

Parameters:
scr - the source code

testSyntax

public java.lang.String testSyntax(java.lang.String scr)

add

public void add(java.lang.String str)
Add to the end of the script string

Parameters:
str - the string to be added


Created at IDI, NTNU by the Artificial Intelligence and Learning group