Examples of ReflectionFunctions


Examples of project.gluebooster.objectanalysis.ReflectionFunctions

       {
          if (object instanceof HasEventMulticaster)
           
                ((HasEventMulticaster)object).getEventMulticaster().addChangeListener(new ListenerWithPredicate(
                    new PredicateByFunction(false,
                        new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod,"getSource"),
                        new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod,"toString"),
                        new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethodOfOtherObject, result, "setText"))
                    ));
            // ((HasEventMulticaster)object).getEventMulticaster().addChangeListener(new ListenerWithPredicate(new WritingPredicate(System.out)));
            
       }
      
View Full Code Here

Examples of project.gluebooster.objectanalysis.ReflectionFunctions

{

  public void testCreateChildrenFilteringTreeNode() throws Exception
  {
    TreeNode rootNode = SampleTreeFactory.createSampleTree1();
    BoostFunction/*<String, Boolean>*/ leafFilter = new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod, "equals", "a");
   
    
   
    TreeNode newRootNode = TreeNodeFactory.createChildrenFilteringTreeNode(rootNode, FunctionFactory.concatenation(/*<TreeNode, Boolea*/ new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod/*<ComputedTreeNode<File>, File>(*/,"getUserObject"), leafFilter), new InvocationContext());
    //only the a leaf is resulting, no other leafs or folder should be present

    JFrame frame1 = JComponentBoostUtils.createDisposingJFrameWithOneComponent("Original", new JTree(rootNode), 800, 800);
    JFrame frame = JComponentBoostUtils.createDisposingJFrameWithOneComponent("Filtered", new JTree(newRootNode), 800, 800);
    //ThreadBoostUtils.sleep(30000);
View Full Code Here

Examples of project.gluebooster.objectanalysis.ReflectionFunctions

  }

  public void testCreateLeafFilteringTreeNode() throws Exception
  {
    TreeNode rootNode = SampleTreeFactory.createSampleTree1();
    BoostFunction<String, Boolean, ?> leafFilter = new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod,"equals", "a");
   
    TreeNode newRootNode = TreeNodeFactory.createLeafFilteringTreeNode(rootNode, /*<TreeNode, Boolean>*/new ModifyingFunction(ModifyingFunction.Operation.concatenatedFunctions, new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod/*<ComputedTreeNode<File>, File>(*/,"getUserObject"), leafFilter), new InvocationContext());
    //only the a leaf is resulting, no other leafs or folder should be present

    JFrame frame1 = JComponentBoostUtils.createDisposingJFrameWithOneComponent("Original", new JTree(rootNode), 800, 800);
    JFrame frame = JComponentBoostUtils.createDisposingJFrameWithOneComponent("Filtered", new JTree(newRootNode), 800, 800);
    //ThreadBoostUtils.sleep(30000);
View Full Code Here

Examples of project.gluebooster.objectanalysis.ReflectionFunctions

      TreeNode rootNode;
      ComputedTreeNode<File> root = FileBoostUtils.createTreeNode( new File(rootDir), new InvocationContext());
      rootNode = root;
      if (allowedFilesFilter != null)
      {
         rootNode = TreeNodeFactory.createLeafFilteringTreeNode(root, FunctionFactory.concatenation(/*<TreeNode, Boolean>*/ new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethod/*<ComputedTreeNode<File>, File>(*/,"getObject"), allowedFilesFilter), new InvocationContext());
      }
      JFrame frame = JComponentBoostUtils.createDisposingJFrameWithOneComponent(new JTree(rootNode), 800, 800);
   }
View Full Code Here

Examples of project.gluebooster.objectanalysis.ReflectionFunctions

  
   public static void main(String[] ignored) throws Exception
   {
      NameFileFilter navigationConfigFilter = new NameFileFilter("navigation-config.xml");
      OrFileFilter fileFilter = new OrFileFilter(DirectoryFileFilter.INSTANCE, navigationConfigFilter);
      BoostFunction navigationFilter = new ReflectionFunctions(ReflectionFunctions.Operation.invokeMethodOfOtherObject, fileFilter, "accept");
      //displayDirectory("C:/christian/projekte/opensource/gluebooster/glueBoosterApplications/assetManagement/target/assetManagement/WEB-INF/useCases", navigationFilter);
      displayDirectory("C:/christian/projekte/opensource/gluebooster/glueBoosterApplications/assetManagement/target/assetManagement/WEB-INF/useCases", navigationFilter);
     
      //TODO here is still an error, all children are displayed.
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.