org.netbeans.modules.bpel.model.impl.services
Class DuplicateVariableDeclarationCheck

java.lang.Object
  extended by org.netbeans.modules.bpel.model.impl.services.InnerEventDispatcherAdapter
      extended by org.netbeans.modules.bpel.model.impl.services.DuplicateVariableDeclarationCheck
All Implemented Interfaces:
InnerEventDispatcher

public class DuplicateVariableDeclarationCheck
extends InnerEventDispatcherAdapter

Author:
ads This service checks for unique name for varaible declaration. It differs from UniqueNameCheck in the way that UniqueNameCheck is generic Parent-Children check. But this is special variable declaration check for various nonstandart situations. One of situations here: OnEvent that implicitly declare varaibles in its child-scope.

Constructor Summary
DuplicateVariableDeclarationCheck()
           
 
Method Summary
 boolean isApplicable(ChangeEvent event)
          This method called for checking either we need to call this visitor for event.
 void preDispatch(ChangeEvent event)
          This method will be called before action on model will be performed.
 
Methods inherited from class org.netbeans.modules.bpel.model.impl.services.InnerEventDispatcherAdapter
postDispatch, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DuplicateVariableDeclarationCheck

public DuplicateVariableDeclarationCheck()
Method Detail

isApplicable

public boolean isApplicable(ChangeEvent event)
Description copied from interface: InnerEventDispatcher
This method called for checking either we need to call this visitor for event.

Specified by:
isApplicable in interface InnerEventDispatcher
Overrides:
isApplicable in class InnerEventDispatcherAdapter
Parameters:
event - Fired event.
Returns:
Is applicable this visitor for event.

preDispatch

public void preDispatch(ChangeEvent event)
                 throws VetoException
Description copied from interface: InnerEventDispatcher
This method will be called before action on model will be performed. This method could throw VetoException. It should not throw any exception on events about accessing to children ( setting/adding/removing child in parent ). This is because OM doesn't have methods that could be incorrectly used. Only setting incorrect attribute value could throw such exception.

Specified by:
preDispatch in interface InnerEventDispatcher
Overrides:
preDispatch in class InnerEventDispatcherAdapter
Parameters:
event - Event that will be fired after OM will be changed. It is not yet happened.
Throws:
VetoException - VetoException Could be thrown if event is rejected by visitor.