Examples of removeMethod()


Examples of org.jboss.forge.roaster.model.source.JavaClassSource.removeMethod()

      methods = aClass.getMethods();
      assertTrue(aClass.getMethods().size() == 1);
      equals = methods.get(0);
      assertEqualsForPrimitives(equals);
      assertFalse(aClass.hasSyntaxErrors());
      aClass.removeMethod(equals);
      assertTrue(aClass.getMethods().size() == 0);
      // hashCode only
      Refactory.createHashCode(aClass, booleanField, byteField, charField, shortField, intField, longField,
               floatField, doubleField);
      assertTrue(aClass.getMethods().size() == 1);
View Full Code Here

Examples of org.jboss.forge.roaster.model.source.JavaClassSource.removeMethod()

      assertTrue(aClass.getMethods().size() == 1);
      methods = aClass.getMethods();
      equals = methods.get(0);
      assertHashCodeForPrimitives(equals);
      assertFalse(aClass.hasSyntaxErrors());
      aClass.removeMethod(equals);
      assertTrue(aClass.getMethods().size() == 0);
   }

   private void assertEqualsForPrimitives(MethodSource<JavaClassSource> equals)
   {
View Full Code Here

Examples of org.jboss.forge.roaster.model.source.JavaClassSource.removeMethod()

      MethodSource<JavaClassSource> equals = methods.get(0);
      MethodSource<JavaClassSource> hashcode = methods.get(1);
      assertHashCodeForArrays(hashcode);
      assertEqualsForArrays(equals);
      assertFalse(aClass.hasSyntaxErrors());
      aClass.removeMethod(equals);
      aClass.removeMethod(hashcode);
      assertTrue(aClass.getMethods().size() == 0);

      Refactory.createEquals(aClass, primitiveArrayField, objectArrayField);
      assertTrue(aClass.getMethods().size() == 1);
View Full Code Here

Examples of ptolemy.copernicus.kernel.EntitySootClass.removeMethod()

        // within the class.
        ModelTransformer.inlineLocalCalls(entityInstanceClass);

        // Remove the __CGInit method.  This should have been
        // inlined above.
        entityInstanceClass.removeMethod(entityInstanceClass.getInitMethod());

        return entityInstanceClass;
    }
}
View Full Code Here

Examples of ptolemy.copernicus.kernel.EntitySootClass.removeMethod()

        // within the class.
        inlineLocalCalls(entityInstanceClass);

        // Remove the __CGInit method.  This should have been
        // inlined above.
        entityInstanceClass.removeMethod(entityInstanceClass.getInitMethod());

        System.out.println("createdMap = " + tempCreatedMap);
        return entityInstanceClass;
    }
View Full Code Here

Examples of ptolemy.copernicus.kernel.EntitySootClass.removeMethod()

        // within the class.
        ModelTransformer.inlineLocalCalls(entityInstanceClass);

        // Remove the __CGInit method.  This should have been
        // inlined above.
        entityInstanceClass.removeMethod(entityInstanceClass.getInitMethod());

        return entityInstanceClass;
    }

    private static void _removeAttributeInitialization(SootClass theClass) {
View Full Code Here

Examples of ptolemy.copernicus.kernel.EntitySootClass.removeMethod()

        // within the class.
        ModelTransformer.inlineLocalCalls(entityInstanceClass);

        // Remove the __CGInit method.  This should have been
        // inlined above.
        entityInstanceClass.removeMethod(entityInstanceClass.getInitMethod());

        return entityInstanceClass;
    }

    private static void _generateActionCode(Entity entity,
View Full Code Here

Examples of soot.SootClass.removeMethod()

                // Keep track of the modification, so we know to
                // modify invocations of that constructor.
                modifiedConstructorClassList.add(theClass);

                // Dance so that indexes in the Scene are properly updated.
                theClass.removeMethod(method);
                theClass.addMethod(method);

                System.out.println("method = " + method);
                JimpleBody body = (JimpleBody) method.retrieveActiveBody();
View Full Code Here

Examples of soot.SootClass.removeMethod()

                if (!reachables.contains(method)) {
                    if (debug) {
                        System.out.println("removing method " + method);
                    }

                    theClass.removeMethod(method);
                }
            }
        }

        // Reset the hierarchy, since we've changed superclasses and such.
View Full Code Here

Examples of soot.SootClass.removeMethod()

                            typeList.add(RefType.v("java.lang.String"));
                            method.setParameterTypes(typeList);

                            // Dance so that indexes in the Scene are properly
                            // updated.
                            theClass.removeMethod(method);
                            theClass.addMethod(method);

                            // Keep track of the modified constructor.
                            classToConstructorMap.put(theClass, method);
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.