Examples of ITypeDeclaration


Examples of org.eclipse.persistence.jpa.jpql.tools.spi.ITypeDeclaration

  /**
   * {@inheritDoc}
   */
  public boolean isTypeDeclarationAssignableTo(Object typeDeclaration1, Object typeDeclaration2) {

    ITypeDeclaration declaration1 = (ITypeDeclaration) typeDeclaration1;
    ITypeDeclaration declaration2 = (ITypeDeclaration) typeDeclaration2;

    // One is an array but not the other one
    if (declaration1.isArray() && !declaration2.isArray() ||
       !declaration1.isArray() &&  declaration2.isArray()) {

      return false;
    }

    // Check the array dimensionality
    if (declaration1.isArray()) {
      return declaration1.getDimensionality() == declaration2.getDimensionality();
    }

    return isAssignableTo(declaration1.getType(), declaration2.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.