Package org.apache.xalan.xsltc.compiler.util

Examples of org.apache.xalan.xsltc.compiler.util.ObjectType


    Object match = _internal2Java.maps(intType, extType);
    if (match != null) {
        currConstrDistance += ((JavaType)match).distance;
    }
    else if (intType instanceof ObjectType) {
        ObjectType objectType = (ObjectType)intType;
        if (objectType.getJavaClass() == extType)
            continue;
        else if (extType.isAssignableFrom(objectType.getJavaClass()))
            currConstrDistance += 1;
        else {
      currConstrDistance = Integer.MAX_VALUE;
      break;
        }
View Full Code Here


        // the moment. The real type checking is performed at runtime.
        if (intType instanceof ReferenceType) {
           currMethodDistance += 1;
        }
        else if (intType instanceof ObjectType) {
            ObjectType object = (ObjectType)intType;
            if (extType.getName().equals(object.getJavaClassName()))
                currMethodDistance += 0;
            else if (extType.isAssignableFrom(object.getJavaClass()))
                currMethodDistance += 1;
            else {
                currMethodDistance = Integer.MAX_VALUE;
                break;
            }
View Full Code Here

    Object match = _internal2Java.maps(intType, extType);
    if (match != null) {
        currConstrDistance += ((JavaType)match).distance;
    }
    else if (intType instanceof ObjectType) {
        ObjectType objectType = (ObjectType)intType;
        if (objectType.getJavaClass() == extType)
            continue;
        else if (extType.isAssignableFrom(objectType.getJavaClass()))
            currConstrDistance += 1;
        else {
      currConstrDistance = Integer.MAX_VALUE;
      break;
        }
    }
    else {
        // no mapping available
        currConstrDistance = Integer.MAX_VALUE;
        break;
    }
      }

      if (j == nArgs && currConstrDistance < bestConstrDistance ) {
          _chosenConstructor = constructor;
          _isExtConstructor = true;
    bestConstrDistance = currConstrDistance;
   
    if (_clazz != null)
            _type = new ObjectType(_clazz);
    else
      _type = new ObjectType(_className);
      }
  }

  if (_type != null) {
      return _type;
View Full Code Here

        // the moment. The real type checking is performed at runtime.
        if (intType instanceof ReferenceType) {
           currMethodDistance += 1;
        }
        else if (intType instanceof ObjectType) {
            ObjectType object = (ObjectType)intType;
            if (extType.getName().equals(object.getJavaClassName()))
                currMethodDistance += 0;
            else if (extType.isAssignableFrom(object.getJavaClass()))
                currMethodDistance += 1;
            else {
                currMethodDistance = Integer.MAX_VALUE;
                break;
            }
        }
        else {
            currMethodDistance = Integer.MAX_VALUE;
            break;
        }
    }
      }

      if (j == nArgs) {
      // Check if the return type can be converted
      extType = method.getReturnType();
   
      _type = (Type) _java2Internal.get(extType);
      if (_type == null) {
          _type = new ObjectType(extType);
      }   

      // Use this method if all parameters & return type match
      if (_type != null && currMethodDistance < bestMethodDistance) {
          _chosenMethod = method;
View Full Code Here

    Object match = _internal2Java.maps(intType, extType);
    if (match != null) {
        currConstrDistance += ((JavaType)match).distance;
    }
    else if (intType instanceof ObjectType) {
        ObjectType objectType = (ObjectType)intType;
        if (objectType.getJavaClass() == extType)
            continue;
        else if (extType.isAssignableFrom(objectType.getJavaClass()))
            currConstrDistance += 1;
        else {
      currConstrDistance = Integer.MAX_VALUE;
      break;
        }
View Full Code Here

        // the moment. The real type checking is performed at runtime.
        if (intType instanceof ReferenceType) {
           currMethodDistance += 1;
        }
        else if (intType instanceof ObjectType) {
            ObjectType object = (ObjectType)intType;
            if (extType.getName().equals(object.getJavaClassName()))
                currMethodDistance += 0;
            else if (extType.isAssignableFrom(object.getJavaClass()))
                currMethodDistance += 1;
            else {
                currMethodDistance = Integer.MAX_VALUE;
                break;
            }
View Full Code Here

    Object match = _internal2Java.maps(intType, extType);
    if (match != null) {
        currConstrDistance += ((JavaType)match).distance;
    }
    else if (intType instanceof ObjectType) {
        ObjectType objectType = (ObjectType)intType;
        if (objectType.getJavaClass() == extType)
            continue;
        else if (extType.isAssignableFrom(objectType.getJavaClass()))
            currConstrDistance += 1;
        else {
      currConstrDistance = Integer.MAX_VALUE;
      break;
        }
View Full Code Here

        // the moment. The real type checking is performed at runtime.
        if (intType instanceof ReferenceType) {
           currMethodDistance += 1;
        }
        else if (intType instanceof ObjectType) {
            ObjectType object = (ObjectType)intType;
            if (extType.getName().equals(object.getJavaClassName()))
                currMethodDistance += 0;
            else if (extType.isAssignableFrom(object.getJavaClass()))
                currMethodDistance += 1;
            else {
                currMethodDistance = Integer.MAX_VALUE;
                break;
            }
View Full Code Here

    Object match = _internal2Java.maps(intType, extType);
    if (match != null) {
        currConstrDistance += ((JavaType)match).distance;
    }
    else if (intType instanceof ObjectType) {
        ObjectType objectType = (ObjectType)intType;
        if (objectType.getJavaClass() == extType)
            continue;
        else if (extType.isAssignableFrom(objectType.getJavaClass()))
            currConstrDistance += 1;
        else {
      currConstrDistance = Integer.MAX_VALUE;
      break;
        }
View Full Code Here

        // the moment. The real type checking is performed at runtime.
        if (intType instanceof ReferenceType) {
           currMethodDistance += 1;
        }
        else if (intType instanceof ObjectType) {
            ObjectType object = (ObjectType)intType;
            if (extType.getName().equals(object.getJavaClassName()))
                currMethodDistance += 0;
            else if (extType.isAssignableFrom(object.getJavaClass()))
                currMethodDistance += 1;
            else {
                currMethodDistance = Integer.MAX_VALUE;
                break;
            }
View Full Code Here

TOP

Related Classes of org.apache.xalan.xsltc.compiler.util.ObjectType

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.