Examples of toXClass()


Examples of org.hibernate.annotations.common.reflection.ReflectionManager.toXClass()

    //if none extract the name from the most generic (superclass > subclass) @Indexed class in the hierarchy
    //FIXME I'm inclined to get rid of the default value
    Class<?> aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.ReflectionManager.toXClass()

    //if none extract the name from the most generic (superclass > subclass) @Indexed class in the hierarchy
    //FIXME I'm inclined to get rid of the default value
    Class<?> aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.ReflectionManager.toXClass()

    //if none extract the name from the most generic (superclass > subclass) @Indexed class in the hierarchy
    //FIXME I'm inclined to get rid of the default value
    Class aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.ReflectionManager.toXClass()

    //if none extract the name from the most generic (superclass > subclass) @Indexed class in the hierarchy
    //FIXME I'm inclined to get rid of the default value
    Class<?> aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.ReflectionManager.toXClass()

    //if none extract the name from the most generic (superclass > subclass) @Indexed class in the hierarchy
    //FIXME I'm inclined to get rid of the default value
    Class<?> aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.ReflectionManager.toXClass()

    //if none extract the name from the most generic (superclass > subclass) @Indexed class in the hierarchy
    //FIXME I'm inclined to get rid of the default value
    Class aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

    List<Contained<String>> contained;
  }

  public void test2StepsGenerics() throws Exception {
    JavaReflectionManager factory = new JavaReflectionManager();
    XClass container = factory.toXClass( Container.class );
    XProperty contained = container.getDeclaredProperties( XClass.ACCESS_FIELD ).get( 0 );
    assertTrue( contained.isTypeResolved() );
    XProperty generic = contained.getType().getDeclaredProperties( XClass.ACCESS_FIELD ).get( 0 );
    assertTrue( generic.isTypeResolved() );
  }
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

    assertTrue( generic.isTypeResolved() );
  }

  public void test2StepsGenericsCollection() throws Exception {
    JavaReflectionManager factory = new JavaReflectionManager();
    XClass container = factory.toXClass( ContainerWithCollection.class );
    XProperty collection = container.getDeclaredProperties( XClass.ACCESS_FIELD ).get( 0 );
    assertTrue( collection.isTypeResolved() );
    XClass elementClass = collection.getElementClass();
    XProperty generic = elementClass.getDeclaredProperties( XClass.ACCESS_FIELD ).get( 0 );
    assertTrue( generic.isTypeResolved() );
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

* @author Emmanuel Bernard
*/
public class DeepGenericsInheritance extends TestCase {
  public void test2StepsGenerics() throws Exception {
    JavaReflectionManager factory = new JavaReflectionManager();
    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

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

*/
public class DeepGenericsInheritance extends TestCase {
  public void test2StepsGenerics() throws Exception {
    JavaReflectionManager factory = new JavaReflectionManager();
    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
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.