Examples of createClass()


Examples of com.hp.hpl.jena.ontology.OntModel.createClass()

    }

    public void testClassJenaToOwl() {
        JenaToOwlConvert j2o = new JenaToOwlConvert();
        OntModel model = ModelFactory.createOntologyModel();
        OntClass jc = model.createClass(CLAZZ.toString());
        OWLClass wc = null;
        try {
            wc = j2o.ClassJenaToOwl(jc, RDFXML);
            if (wc == null) fail("Some problems accours");
            else {
View Full Code Here

Examples of com.intellij.psi.JavaDirectoryService.createClass()

    @NotNull
    protected PsiClass doCreate( final PsiDirectory dir, final String className )
        throws IncorrectOperationException
    {
        JavaDirectoryService javaDirectoryService = JavaDirectoryService.getInstance();
        return javaDirectoryService.createClass( dir, className, TEMPLATE_GENERIC_CONCERN_OF );
    }
}
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.createClass()

  private void createSchema(ODatabaseDocumentTx dbDocumentTx) {
    ODatabaseRecordThreadLocal.INSTANCE.set(dbDocumentTx);

    OSchema schema = dbDocumentTx.getMetadata().getSchema();
    if (!schema.existsClass("TestClass")) {
      OClass testClass = schema.createClass("TestClass");
      testClass.createProperty("id", OType.LONG);
      testClass.createProperty("timestamp", OType.LONG);
      testClass.createProperty("stringValue", OType.STRING);

      testClass.createIndex("idIndex", OClass.INDEX_TYPE.UNIQUE, "id");
View Full Code Here

Examples of com.sun.tools.xjc.util.CodeModelClassFactory.createClass()

    saxParserFactoryClass = codeModel._ref(SAXParserFactory.class);
    parserConfigurationExceptionClass = codeModel._ref(ParserConfigurationException.class);
   
    final CodeModelClassFactory classFactory = outline.getClassFactory();
    final JPackage kmlpackage = Util.getKmlClassPackage(outline);
    namespaceFilterHandler = classFactory.createClass(kmlpackage, JMod.FINAL, "NamespaceFilterHandler", null, ClassType.CLASS);
    namespaceFilterHandler._implements(contentHandlerClass.boxify());
    final JFieldVar KML_20 = namespaceFilterHandler.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, stringClass, "KML_20", JExpr.lit("http://earth.google.com/kml/2.0"));
    final JFieldVar KML_21 = namespaceFilterHandler.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, stringClass, "KML_21", JExpr.lit("http://earth.google.com/kml/2.1"));
    final JFieldVar KML_22 = namespaceFilterHandler.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, stringClass, "KML_22", JExpr.lit("http://www.opengis.net/kml/2.2"));
    final JFieldVar content = namespaceFilterHandler.field(JMod.PRIVATE, contentHandlerClass, "contentHandler");
View Full Code Here

Examples of edu.mayo.bmi.guoqian.claml.ObjectFactory.createClass()

              //RDFSNamedClass icdCategory = icdContentModel.getICDCategory("http://who.int/icd#I82.0");
              //System.out.println("Displayed as in the tree: " + icdCategory.getBrowserText());
           
              //System.out.println(index++ + "|" + icdCategory.getBrowserText());
           
              edu.mayo.bmi.guoqian.claml.Class cls = factory.createClass();

              /*
              //get original code, if not availabel it is "TBD"
              String classCode = getClassCode(icdCategory);
             
View Full Code Here

Examples of javassist.util.proxy.ProxyFactory.createClass()

  }

  public <T> T newInstance(Class<T> classToInstantiate) {
    ProxyFactory proxyFactory = new ProxyFactory();
    proxyFactory.setSuperclass(classToInstantiate);
    Class newClass = proxyFactory.createClass();
    Object instance;
    try {
      instance = newClass.newInstance();
    } catch (Exception e) {
      throw new MappingException(e);
View Full Code Here

Examples of net.sf.cglib.beans.BeanGenerator.createClass()

    //
    // Enhance the class by placing a GetCachingMethodInterceptor
    // intercepter on all the getter and setter methods.

    final Class newClazz = (Class) beanGenerator.createClass();

    final Callback[] callbacks = new Callback[] { new GetCachingMethodInterceptor(clazz.newInstance()), NoOp.INSTANCE };

    return (ConnectionFactory) Enhancer.create(newClazz, new Class[] { ConnectionFactory.class, QueueConnectionFactory.class, TopicConnectionFactory.class }, new CallbackFilter() {
      public int accept(Method m) {
View Full Code Here

Examples of net.sf.cglib.proxy.Enhancer.createClass()

            Enhancer e = new Enhancer();
            e.setSuperclass(c.getClass());
            e.setCallbackType(ChannelInterceptor.class);
            e.setUseFactory(false);

            Class mock = e.createClass();
            Enhancer.registerCallbacks(mock, new Callback[] { interceptor });
           
            try
            {
                cached = Sun14ReflectionProvider.newInstance(mock);
View Full Code Here

Examples of net.sf.cglib.proxy.Enhancer.createClass()

        Enhancer e = new Enhancer();
        e.setSuperclass(transport.getClass());
        e.setCallbackType(TransportInterceptor.class);
        e.setUseFactory(false);

        Class mock = e.createClass();
        Enhancer.registerCallbacks(mock, new Callback[] { interceptor });
       
        try
        {
            Object t = Sun14ReflectionProvider.newInstance(mock);
View Full Code Here

Examples of net.sf.cglib.proxy.Enhancer.createClass()

                    classBytes = b;
                    return b;
                }
            });
            enhancer.setClassLoader(new URLClassLoader(new URL[0], this.getClass().getClassLoader()));
            Class type = enhancer.createClass();
            URI location = new URI("cglib/");
            context.addClass(location, type.getName(), classBytes);
            ClassLoader cl = context.getClassLoader();
            Class loadedType = cl.loadClass(type.getName());
            assertTrue(DataSource.class.isAssignableFrom(loadedType));
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.