Examples of makeInterface()


Examples of com.google.gwt.user.rebind.ClassSourceFileComposerFactory.makeInterface()

        throws UnableToCompleteException {
        String packageName = type.getQualifiedSourceName() + "_impls";
        String className = type.getSimpleSourceName() + "_RemoteServiceAsync";
        ClassSourceFileComposerFactory mcf = new ClassSourceFileComposerFactory(packageName,
                className);
        mcf.makeInterface();
        PrintWriter pw = context.tryCreate(logger, packageName, className);
        if(pw == null){
            return;
        }
        SourceWriter sw = mcf.createSourceWriter(context, pw);
View Full Code Here

Examples of com.google.gwt.user.rebind.ClassSourceFileComposerFactory.makeInterface()

   
    for(Class<?> clazz: beanlist) {
      fac.addImport(clazz.getName());
    }
   
    fac.makeInterface();
    fac.addImplementedInterface(Validator.class.getName());
   
    fac.addAnnotationDeclaration(createAnnotation(beanlist));

    if (pw != null) {
View Full Code Here

Examples of com.google.gwt.user.rebind.ClassSourceFileComposerFactory.makeInterface()

  private void setup(String packageName, String className, File resourceBundle,
      File targetLocation, Class interfaceClass) throws IOException {
    ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(
        packageName, className);
    factory.makeInterface();
    factory.setJavaDocCommentForClass(javaDocComment(resourceBundle.getCanonicalPath().replace(
        File.separatorChar, '/')));
    factory.addImplementedInterface(interfaceClass.getName());
    FileOutputStream file = new FileOutputStream(targetLocation);
    Writer underlying = new OutputStreamWriter(file, Util.DEFAULT_ENCODING);
View Full Code Here

Examples of com.google.gwt.user.rebind.ClassSourceFileComposerFactory.makeInterface()

    final String packageName = this.getPackage().getName();
    final String simpleClassName = this.getSimpleName();

    final ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(packageName, simpleClassName);
    if (this.isInterface()) {
      composerFactory.makeInterface();
    }

    this.setSuperClassUponClassSourceFileComposerFactory(composerFactory);
    this.addImplementedInterfacesToClassSourceFileComposerFactory(composerFactory);
    this.setClassJavaDoc(composerFactory);
View Full Code Here

Examples of com.google.gwt.user.rebind.ClassSourceFileComposerFactory.makeInterface()

      ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(
          bean.getPackage(), bean.getValidatorName());
      factory.addImplementedInterface(GwtSpecificValidator.class.getCanonicalName()
          + " <" + bean.getTypeCanonicalName() + ">");
      factory.addImport(GWT.class.getCanonicalName());
      factory.makeInterface();
      SourceWriter sw = factory.createSourceWriter(context, pw);

      // static MyValidator INSTANCE = GWT.create(MyValidator.class);
      sw.print("static ");
      sw.print(bean.getValidatorName());
View Full Code Here

Examples of javassist.ClassPool.makeInterface()

      // ok, continue
    }

    final Set<CtMethod> used = new HashSet<>();
    ClassPool pool = ClassPool.getDefault();
    CtClass inter = pool.makeInterface(interfaceName);
   
    try {
      CtClass returnType = pool.get(String.class.getName());
      CtClass objectType = pool.get(Object.class.getName());
View Full Code Here

Examples of javassist.ClassPool.makeInterface()

            }

            CtClass originalClass = classPool.get(intf.getName());
            ClassFile originalClassFile = originalClass.getClassFile();

            CtClass newClass = classPool.makeInterface(simplifiedName);

            newClass.defrost();

            ClassFile newClassFile = newClass.getClassFile();
View Full Code Here

Examples of javassist.ClassPool.makeInterface()

   
    private Class<?> defineCustomInterface(ResourceClientProxy proxy) {
        try {
            // define the dynamic class - do not put it in any known rhq package in case our jars are signed (see BZ-794503)
            ClassPool pool = ClassPoolFactory.getClassPool(ResourceClientProxy.class.getClassLoader());
            CtClass customClass = pool.makeInterface("org.rhq.bindings.client.dynamic."
                + ResourceClientProxy.class.getSimpleName() + proxy.fingerprint);

            for (String key : proxy.allProperties.keySet()) {
                Object prop = proxy.allProperties.get(key);
View Full Code Here

Examples of javassist.ClassPool.makeInterface()

            String remoteType = type.getName() + "$Remote";
            try {
                return (Class<T>) Class.forName(remoteType, true, type.getClassLoader());
            } catch (ClassNotFoundException e) {
                ClassPool pool = ClassGenerator.getClassPool(type.getClassLoader());
                CtClass ctClass = pool.makeInterface(remoteType);
                ctClass.addInterface(getCtClass(pool, Remote.class.getName()));
                Method[] methods = type.getMethods();
                for (Method method : methods) {
                    CtClass[] parameters = new CtClass[method.getParameterTypes().length];
                    int i = 0;
View Full Code Here

Examples of javassist.ClassPool.makeInterface()

            String remoteType = type.getName() + "$Remote";
            try {
                return (Class<T>) Class.forName(remoteType, true, type.getClassLoader());
            } catch (ClassNotFoundException e) {
                ClassPool pool = ClassGenerator.getClassPool(type.getClassLoader());
                CtClass ctClass = pool.makeInterface(remoteType);
                // ctClass.addInterface(pool.getCtClass(type.getName()));
                ctClass.addInterface(pool.getCtClass(Remote.class.getName()));
                Method[] methods = type.getMethods();
                for (Method method : methods) {
                    CtClass[] parameters = new CtClass[method.getParameterTypes().length];
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.