Examples of addMethod()


Examples of org.dyno.visual.swing.plugin.spi.IEventListenerModel.addMethod()

      model = ParserFactory.getDefaultParserFactory().newModel(adapter,
          eventSet);
      eventDescriptor.put(eventSet, model);
    }
    if (!model.hasMethod(methodDesc)) {
      model.addMethod(methodDesc);
      adapter.setDirty(true);
    }
    adapter.addNotify();
    VisualDesigner designer = adapter.getDesigner();
    if (designer != null) {
View Full Code Here

Examples of org.eclipse.xtend.lib.macro.declaration.MutableTypeDeclaration.addMethod()

          boolean _isStatic = field.isStatic();
          it.setStatic(_isStatic);
          it.setVisibility(visibility);
        }
      };
      _declaringType.addMethod(_getterName, _function);
    }
   
    public AccessorType getSetterType(final FieldDeclaration it) {
      AnnotationReference _elvis = null;
      AnnotationReference _accessorsAnnotation = this.getAccessorsAnnotation(it);
View Full Code Here

Examples of org.exolab.javasource.JClass.addMethod()

        //-- #valueOf method
        JMethod method = new JMethod("valueOf", jClass,
                                     "the String value of the provided " + baseType.getJType());
        method.addParameter(new JParameter(SGTypes.STRING, "string"));
        method.getModifiers().setStatic(true);
        jClass.addMethod(method);
        jdc = method.getJDocComment();
        jdc.appendComment("Returns the " + baseType.getJType());
        jdc.appendComment(" based on the given String value.");
        jsc = method.getSourceCode();
View Full Code Here

Examples of org.exolab.javasource.JEnum.addMethod()

        jEnum.addField(jField);

        JMethod valueMethod = new JMethod("value", new JClass("java.lang.String"),
                "the value of this constant");
        valueMethod.setSourceCode("return this.value;");
        jEnum.addMethod(valueMethod, false);

        JMethod fromValueMethod = new JMethod("fromValue", jEnum, "the constant for this value");
        fromValueMethod.addParameter(new JParameter(new JClass("java.lang.String"), "value"));
        JSourceCode sourceCode = new JSourceCode();
        sourceCode.add("for (" + jEnum.getLocalName() + " c: "
View Full Code Here

Examples of org.exoplatform.management.spi.ManagedTypeMetaData.addMethod()

                        + " cannot be annoated with @" + ManagedName.class.getName() + " with value "
                        + managedName.value());
            }

            //
            managedType.addMethod(entry.getValue());
         }
      }

      // Process attributes
      Set<String> attributeNames = new HashSet<String>();
View Full Code Here

Examples of org.hotswap.agent.javassist.CtClass.addMethod()

        ClassPool classPool = ClassPool.getDefault();
        classPool.appendSystemPath();

        CtClass clazz = classPool.makeClass("Test");
        clazz.addMethod(CtNewMethod.make("public void test() {" + s + "}", clazz));
        Class<?> testClass = clazz.toClass();


        Method testMethod = testClass.getDeclaredMethod("test");
        testMethod.invoke(testClass.newInstance());
View Full Code Here

Examples of org.jacoco.core.internal.analysis.ClassCoverageImpl.addMethod()

    final ClassCoverageImpl classCoverageImpl = new ClassCoverageImpl(
        "org/jacoco/example/FooClass", 1001, null, "java/lang/Object",
        new String[0]);
    classCoverageImpl.setSourceFileName("FooClass.java");
    classCoverageImpl.addMethod(methodCoverage);
    classCoverage = classCoverageImpl;

    final SourceFileCoverageImpl sourceFileCoverageImpl = new SourceFileCoverageImpl(
        "FooClass.java", "org/jacoco/example");
    sourceFileCoverageImpl.increment(classCoverage);
View Full Code Here

Examples of org.jboss.classfilewriter.ClassFile.addMethod()

    public byte[] createTokenizer(final String existingClassName, final String[] httpVerbs, String[] httpVersions, String[] standardHeaders) {
        final String className = existingClassName + CLASS_NAME_SUFFIX;
        final ClassFile file = new ClassFile(className, existingClassName);


        final ClassMethod ctor = file.addMethod(AccessFlag.PUBLIC, "<init>", "V", DescriptorUtils.parameterDescriptors(constructorDescriptor));
        ctor.getCodeAttribute().aload(0);
        ctor.getCodeAttribute().loadMethodParameters();
        ctor.getCodeAttribute().invokespecial(existingClassName, "<init>", constructorDescriptor);
        ctor.getCodeAttribute().returnInstruction();
View Full Code Here

Examples of org.jboss.errai.codegen.framework.meta.impl.build.BuildMetaClass.addMethod()

              method.getGenericReturnType(),
              DefParameters.fromParameters(parameters), ThrowsDeclaration.of(method.getCheckedExceptions()));

      newMethod.setReifiedFormOf(method);

      buildMetaClass.addMethod(newMethod);
    }

    return buildMetaClass;
  }
View Full Code Here

Examples of org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.addMethod()

          GenUtil.scopeOf(method), GenUtil.modifiersOf(method), method.getName(), returnType,
          DefParameters.fromParameters(parameters), ThrowsDeclaration.of(method.getCheckedExceptions()), method);

      newMethod.setReifiedFormOf(method);

      buildMetaClass.addMethod(newMethod);
    }

    return buildMetaClass;
  }
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.