Package org.hibernate.reflection.java

Examples of org.hibernate.reflection.java.JavaXFactory


/**
* @author Emmanuel Bernard
*/
public class DeepGenericsInheritance extends TestCase {
  public void test2StepsGenerics() throws Exception {
    JavaXFactory factory = new JavaXFactory();
    XClass subclass2 = factory.toXClass( Subclass2.class );
    XClass dummySubclass = factory.toXClass( DummySubclass.class );
    XClass superclass = subclass2.getSuperclass();
    XClass supersuperclass = superclass.getSuperclass();
    assertTrue( supersuperclass.getDeclaredProperties( "field" ).get( 1 ).isTypeResolved() );
    assertEquals( dummySubclass, supersuperclass.getDeclaredProperties( "field" ).get( 1 ).getType() );

View Full Code Here


    hbmEntities = new HashMap<String, Document>();
    annotatedClassEntities = new HashMap<String, XClass>();
    hbmDocuments = new ArrayList<Document>();
    namingStrategy = EJB3NamingStrategy.INSTANCE;
    setEntityResolver( new EJB3DTDEntityResolver() );
    reflectionManager = new JavaXFactory();
  }
View Full Code Here

     */
    public ClassValidator(
      Class<T> beanClass, ResourceBundle resourceBundle, MessageInterpolator interpolator,
            Map<XClass, ClassValidator> childClassValidators, ReflectionManager reflectionManager
    ) {
        this.reflectionManager = reflectionManager != null ? reflectionManager : new JavaXFactory();
        XClass beanXClass = this.reflectionManager.toXClass( beanClass );
    this.beanClass = beanClass;
    this.messageBundle = resourceBundle == null ?
        getDefaultResourceBundle() :
        resourceBundle;
View Full Code Here

    ResourceBundle rb = (ResourceBundle) ois.readObject();
    if ( rb == null ) rb = getDefaultResourceBundle();
    this.messageBundle = rb;
    this.userInterpolator = (MessageInterpolator) ois.readObject();
    this.defaultMessageBundle = ResourceBundle.getBundle( DEFAULT_VALIDATOR_MESSAGE );
    reflectionManager = new JavaXFactory();
    initValidator( reflectionManager.toXClass( beanClass ), new HashMap<XClass, ClassValidator>() );
  }
View Full Code Here

            if ( cfg instanceof AnnotationConfiguration ) {
                //reuse the existing reflectionManager one when possible
                reflectionManager = ( (AnnotationConfiguration) cfg).getReflectionManager();
            }
            else {
                reflectionManager = new JavaXFactory();
            }
            while ( classes.hasNext() ) {
        PersistentClass clazz = classes.next();
        final Class mappedClass = clazz.getMappedClass();
        ClassValidator validator = new ClassValidator( mappedClass, null, interpolator, null, reflectionManager );
View Full Code Here

    hbmEntities = new HashMap<String, Document>();
    annotatedClassEntities = new HashMap<String, XClass>();
    hbmDocuments = new ArrayList<Document>();
    namingStrategy = EJB3NamingStrategy.INSTANCE;
    setEntityResolver( new EJB3DTDEntityResolver() );
    reflectionManager = new JavaXFactory();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.reflection.java.JavaXFactory

Copyright © 2018 www.massapicom. 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.