Package org.bladerunnerjs.plugin

Examples of org.bladerunnerjs.plugin.Plugin


  }
 
  @Override
  public boolean equals(Object object)
  {
    Plugin otherPlugin = (object instanceof VirtualProxyPlugin) ? ((VirtualProxyPlugin) object).plugin : (Plugin) object;
   
    return plugin == otherPlugin;
  }
View Full Code Here


* details). Since this class is abstract, developers will need to extend one of this classes sub-classes to make use of this functionality.
*/
public abstract class AbstractPlugin implements Plugin {
  @Override
  public boolean equals(Object object) {
    Plugin plugin = (object instanceof VirtualProxyPlugin) ? ((VirtualProxyPlugin) object).getUninitializedUnderlyingPlugin() : (Plugin) object;
   
    return this == plugin;
  }
View Full Code Here

import org.junit.Test;

public class VirtualProxyPluginTest {
  @Test
  public void instanceOfWorks() {
    Plugin plugin = new VirtualProxyPlugin(new MyTestPlugin());
   
    assertTrue("1", plugin.instanceOf(MyTestPlugin.class));
    assertTrue("2", plugin.instanceOf(TestPlugin.class));
  }
View Full Code Here

    assertTrue("2", plugin.instanceOf(TestPlugin.class));
  }
 
  @Test
  public void equalityWorks() {
    Plugin plugin = new MyTestPlugin();
    Plugin proxyPlugin = new VirtualProxyPlugin(plugin);
   
    assertTrue("1", plugin.equals(plugin));
    assertTrue("2", proxyPlugin.equals(proxyPlugin));
    assertTrue("3", proxyPlugin.equals(plugin));
    assertTrue("4", plugin.equals(proxyPlugin));
  }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.plugin.Plugin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.