Examples of TypeImpl


Examples of org.apache.axis2.rmi.metadata.impl.TypeImpl

                } catch (InvocationTargetException e) {
                    throw new MetaDataPopulateException("No getBeanClass method is not defined for " +
                            " rmi bean class " + baseClass.getName());
                }
            } else {
                this.type = new TypeImpl(baseClass);
                // we have to do this before calling to populate meta data
                // to avoid cirecular references
                processedTypeMap.put(baseClass, this.type);
                this.type.populateMetaData(configurator, processedTypeMap);
            }
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.impl.TypeImpl

                    throw new MetaDataPopulateException("No getBeanClass method is not defined for " +
                    " rmi bean class " + baseClass.getName());
                }

            } else {
                this.type = new TypeImpl(baseClass);
                processedTypeMap.put(baseClass, this.type);
                this.type.populateMetaData(configurator, processedTypeMap);
            }
        } catch (IllegalAccessException e) {
            throw new MetaDataPopulateException("Can not instataite class "
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.impl.TypeImpl

                    } catch (InstantiationException e) {
                        throw new MetaDataPopulateException("Can not instantiate RMI bean class " +
                                baseClass.getName());
                    }
                } else {
                    this.type = new TypeImpl(baseClass);
                    processedTypeMap.put(baseClass, this.type);
                    this.type.populateMetaData(configurator, processedTypeMap);
                }
            } else {
                throw new MetaDataPopulateException("Attribute element must have a known simpe type");
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.impl.TypeImpl

            }

            if (processedTypeMap.containsKey(baseClass)){
                this.type = (Type) processedTypeMap.get(baseClass);
            } else {
                this.type = new TypeImpl(baseClass);
                processedTypeMap.put(baseClass, this.type);
                this.type.populateMetaData(configurator, processedTypeMap);
            }
        } catch (IllegalAccessException e) {
            throw new MetaDataPopulateException("Can not instataite class "
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.impl.TypeImpl

        Class extensionClass = null;
        Type extensionType = null;
        for (Iterator iter = this.configurator.getExtensionClasses().iterator(); iter.hasNext();) {
            extensionClass = (Class) iter.next();
            if (!this.processedTypeMap.containsKey(extensionClass)) {
                extensionType = new TypeImpl(extensionClass);
                this.processedTypeMap.put(extensionClass, extensionType);
                extensionType.populateMetaData(this.configurator, this.processedTypeMap);
            }
        }
    }
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.impl.TypeImpl

    public void testChildClass() {

        Configurator configurator = new Configurator();
        Map processedTypeMap = new HashMap();

        Type type = new TypeImpl(ChildClass.class);
        try {
            type.populateMetaData(configurator,processedTypeMap);
        } catch (MetaDataPopulateException e) {
            fail();
        }
    }
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.impl.TypeImpl

        Set defaultTypeMapKeys = JavaTypeToQNameMap.getKeys();
        Class typeClass;
        for (Iterator iter = defaultTypeMapKeys.iterator(); iter.hasNext();) {
            typeClass = (Class) iter.next();
            if (!processedTypeMap.containsKey(typeClass)) {
                Type newType = new TypeImpl(typeClass);
                processedTypeMap.put(typeClass, newType);
                newType.populateMetaData(this.configurator, processedTypeMap);
                newType.generateSchema(this.configurator, schemaMap);
            }
        }
        this.qNameToTypeMap = new HashMap();
        Type type = null;
        for (Iterator iter = processedTypeMap.values().iterator(); iter.hasNext();) {
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.impl.TypeImpl

                // handle extensions here.
                // primitive can not have excented types
                if (!object.getClass().equals(type.getJavaClass()) && !type.getJavaClass().isPrimitive()) {
                    // i.e this is an extension
                    if (!processedTypeMap.containsKey(object.getClass())) {
                        Type newType = new TypeImpl(object.getClass());
                        processedTypeMap.put(object.getClass(), newType);
                        try {
                            newType.populateMetaData(this.configurator, this.processedTypeMap);
                            newType.generateSchema(this.configurator, this.schemaMap);
                        } catch (MetaDataPopulateException e) {
                            new XmlSerializingException("Problem in processing new type", e);
                        } catch (SchemaGenerationException e) {
                            new XmlSerializingException("Problem in processing new type", e);
                        }
View Full Code Here

Examples of org.apache.uima.cas.impl.TypeImpl

   * @return
   */
  private synchronized Map loadJCasClasses(ClassLoader cl) {
    final TypeSystem ts = casImpl.getTypeSystem();
    Iterator typeIt = ts.getTypeIterator();
    TypeImpl t;
    String casName;
    Map jcasTypes = new HashMap();

    // * note that many of these may have already been loaded
    // * load all the others. Actually, we ask to load all the types
    // * and the ones already loaded - we just get their loaded versions
    // returned.
    // * Loading will run the static init functions.

    while (typeIt.hasNext()) {
      t = (TypeImpl) typeIt.next();
      casName = t.getName();
      String name_Type;
      if (builtInsWithNoJCas.contains(casName))
        continue;
      if (builtInsWithAltNames.contains(casName))
        // * convert uima.cas.Xxx -> org.apache.uima.jcas.cas.Xxx
        // * convert uima.tcas.Annotator ->
        // org.apache.uima.jcas.tcas.Annotator
        try {
          String nameBase = "org.apache.uima.jcas." + casName.substring(5);
          name_Type = nameBase + "_Type";
          jcasTypes.put(nameBase, new LoadedJCasType(t.getName(), Class.forName(name_Type, true, cl), cl));
        } catch (ClassNotFoundException e1) {
          // OK for DocumentAnnotation, which may not have a cover class.
          // Otherwise, not OK.
          if (!CAS.TYPE_NAME_DOCUMENT_ANNOTATION.equals(casName)) {
            assert false : "never get here because built-ins have java cover types";
            e1.printStackTrace();
          }
        }

      // this is done unconditionally to pick up old style cover functions if
      // any
      // as well as other JCas model types
      try {
        name_Type = casName + "_Type";
        jcasTypes.put(casName, new LoadedJCasType(t.getName(), Class.forName(name_Type, true, cl), cl));
        // also force the load the plain name without _Type for
        // old-style - that's where
        // the index is incremented
        Class.forName(casName, true, cl);
      } catch (ClassNotFoundException e1) {
View Full Code Here

Examples of org.apache.uima.cas.impl.TypeImpl

  private void makeInstanceOf_Type(LoadedJCasType jcasTypeInfo, boolean alreadyLoaded, FSGenerator[] fsGenerators) {
    Constructor c_Type = jcasTypeInfo.constructorFor_Type;
    Constructor cType  = jcasTypeInfo.constructorForType;
    int typeIndex = jcasTypeInfo.index;
    TypeImpl casType = (TypeImpl)casImpl.getTypeSystem().getType(jcasTypeInfo.typeName);

    try {
      constructorArgsFor_Type[0] = this;
      constructorArgsFor_Type[1] = casType;
      TOP_Type x_Type_instance = (TOP_Type) c_Type.newInstance(constructorArgsFor_Type);
      typeArray[typeIndex] = x_Type_instance;
      // install the standard generator
      if (! alreadyLoaded) {
        final TypeSystemImpl ts = casImpl.getTypeSystemImpl();
        fsGenerators[casType.getCode()] = new JCasFsGenerator(typeIndex, cType, jcasTypeInfo.isSubtypeOfAnnotationBase,
                ts.sofaNumFeatCode, ts.annotSofaFeatCode);
//        this.casImpl.getFSClassRegistry().loadJCasGeneratorForType(typeIndex, cType, casType, jcasTypeInfo.isSubtypeOfAnnotationBase);
      }
    } catch (SecurityException e) {
      logAndThrow(e);
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.