Examples of addMethod()


Examples of javassist.CtClass.addMethod()

            {
                CtMethod method = (CtMethod)allMethods.next();
                CtMethod newMethod = new CtMethod(method, ctTranslatorClass, null);
                String methodBody = (String)this.methods.get(method);
                newMethod.setBody(methodBody);
                ctTranslatorClass.addMethod(newMethod);
            }

        }
        this.writeAdaptedClass();
        return ctTranslatorClass.toClass();
View Full Code Here

Examples of javassist.bytecode.ClassFile.addMethod()

                    newMethod.getMethodInfo().addAttribute(annotations);
                }

                //it is important to add the method directly to the classfile, not the class
                //because otherwise the generics info wouldn't survive
                newClassFile.addMethod(newMethod.getMethodInfo());
            }

            return newClass.toClass();

        } catch (Exception e) {
View Full Code Here

Examples of jminusminus.CLEmitter.addMethod()

        // Add message() method to HelloWorld
        accessFlags.clear();
        accessFlags.add("private");
        accessFlags.add("static");
        e.addMethod(accessFlags, "message", "()Ljava/lang/String;", null, true);
        e.addLDCInstruction("Hello, World!");
        e.addNoArgInstruction(ARETURN);

        // Add main() method to HelloWorld
        accessFlags.clear();
View Full Code Here

Examples of jp.co.smg.endosnipe.javassist.CtClass.addMethod()

            CtMethod getServerInfoMethod = CtMethod.make("" + //
                    "public long getCreateTimeJvn(){ " + //
                    "        return this.createTimeJvn;" + //
                    "}", ctClass);
            ctClass.addMethod(getServerInfoMethod);
           
        }

        for (CtBehavior ctBehavior : behaviorList)
        {
View Full Code Here

Examples of net.sf.joafip.store.entity.bytecode.agent.PackageNode.addMethod()

  public void addMethod(final String[] path, final int beginIndex,
      final int endIndex, final String methodName,
      final EnumTransformationType transformationType) {
    final PackageNode currentNode = addPackage(path, beginIndex, endIndex);
    currentNode.addMethod(methodName, transformationType);
  }

  public EnumTransformationType transformAttribute(
      final String[] classNamePath) {
    final int length = classNamePath.length;
View Full Code Here

Examples of oracle.adf.model.adapter.dataformat.StructureDef.addMethod()

            MovableStructureDefinition structDef =
                structProv.buildStructure(rootDataNode, getReturnStructName(rootStruct, defNode), typeMapper);

            // create MethodDef with StructureDef from StructureProvider as return value
            final MethodDef method = new MethodDef(defNode.getDatacontrolOperation(), rootStruct);
            rootStruct.addMethod(method);

            // add parameters to method-definition if data provider has dynamic parameters
            {
                final Set<DynamicParameter> dynamicParams = defNode.getDynamicParams();
                if (dynamicParams != null) {
View Full Code Here

Examples of org.ajax4jsf.builder.model.JavaClass.addMethod()

    javaClass.addModifier(JavaModifier.PUBLIC);
   
    javaClass.addField(getComponentFamily(componentBean));
    javaClass.addField(getComponentType(componentBean));
   
    javaClass.addMethod(getConstructor(componentBean, javaClass));
   
    Collection<PropertyBean> properties = componentBean.getProperties();
   
    for (PropertyBean propertyBean : properties) {
      PropertyProcessor proc = null;
View Full Code Here

Examples of org.allspice.bytecode.ClassDef.addMethod()

          new Load(new Var(0,new TypeName("TestClass"))),
          new Load(x),
          new Store(new FieldRef(cd.name,new TypeName(type),"foo")),
          new Return(TypeCode.VOID)
          ) ;
      cd = cd.addMethod(md) ;
    }
    {
      MethodDef md = new MethodDef(new TypeName(type),"getFoo") ;
      md = md.addInstructions(
          new Load(new Var(0,new TypeName("TestClass"))),
View Full Code Here

Examples of org.apache.bcel.generic.ClassGen.addMethod()

                org.apache.bcel.generic.Type.VOID,
                new org.apache.bcel.generic.Type[] { org.apache.bcel.generic.Type.STRING },
                Constants.INVOKESPECIAL));

        mg.setMaxStack();
        cg.addMethod(mg.getMethod());

        return cg.getJavaClass().getBytes();
    }

    static org.aspectj.apache.bcel.generic.Type printStreamAT = org.aspectj.apache.bcel.generic.Type.getType("Ljava/io/PrintStream;");
View Full Code Here

Examples of org.apache.catalina.deploy.SecurityCollection.addMethod()

                loginConfig.setRealmName(realmName);
                this.setLoginConfig(loginConfig);

                //Setup a default Security Constraint
                SecurityCollection collection = new SecurityCollection();
                collection.addMethod("GET");
                collection.addMethod("POST");
                collection.addPattern("/*");
                collection.setName("default");
                SecurityConstraint sc = new SecurityConstraint();
                sc.addAuthRole("*");
 
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.