code: public boolean is_allowed(DeviceImpl dev,Any data_in)
  	{
  		if (state_method == null)
  			return true;
  		else
  		{
  
  //
  // If the Method reference is not null, execute the method with the invoke
  // method
  //
  
  			try
  			{
  				java.lang.Object[] meth_param = new java.lang.Object[1];
  				meth_param[0] = data_in;
  				java.lang.Object obj = state_method.invoke(dev,meth_param);
  				return (Boolean) obj;
  			}
  			catch(InvocationTargetException e)
  			{
  				return false;
  			}
  			catch(IllegalArgumentException e)
  			{
  				return false;
  			}
  			catch (IllegalAccessException e)
  			{
  				return false;
  			}
  		}
  	}
docs: Invoke the command allowed method given at object creation time.
  
  This method is automtically called by the TANGO core classes when the
  associated command is requested by a client to check if the command is allowed
  in the actual device state. If the user give a command allowed method
  at object creation time, this method will be invoked.
  
  @param dev The device on which the command must be executed
  @param data_in The incoming data still packed in a CORBA Any object. For
  command created with this TemplCommand class, this Any object does not
  contain data
  @return A boolean set to true is the command is allowed. Otherwise, the
  return value is false. This return value is always set to true if the user
  does not supply a method to be excuted. If a method has been supplied, the
  return value is the value returned by the user supplied mehod.