public Expression getTypeClause() { if (typeExpression == null) { if (getDescriptor() !=null && isDowncast()) { InheritancePolicy ip = this.getDescriptor().getInheritancePolicy(); if (ip.isChildDescriptor()) {//or use the isDowncast flag. Don't need to do anything if its not a downcast //equivalent to typeExpressionBase.type().in(this.getDescriptor().getInheritancePolicy().getChildClasses()) typeExpression = ip.getWithAllSubclassesExpression(); if (typeExpression == null ) { typeExpression = typeExpressionBase.type().equal(this.getDescriptor().getJavaClass()); } else { typeExpression = this.typeExpressionBase.twist(typeExpression, typeExpressionBase); } } } else { typeExpression = this.getBuilder();//equivalent to an empty expression. } } return typeExpression; }
public Expression getTypeClause() { if (typeExpression == null) { if (getDescriptor() !=null && isDowncast()) { InheritancePolicy ip = this.getDescriptor().getInheritancePolicy(); if (ip.isChildDescriptor()) {//or use the isDowncast flag. Don't need to do anything if its not a downcast //equivalent to typeExpressionBase.type().in(this.getDescriptor().getInheritancePolicy().getChildClasses()) typeExpression = ip.getWithAllSubclassesExpression(); if (typeExpression == null ) { typeExpression = typeExpressionBase.type().equal(this.getDescriptor().getJavaClass()); } else { typeExpression = this.typeExpressionBase.twist(typeExpression, typeExpressionBase); } } } else { typeExpression = this.getBuilder();//equivalent to an empty expression. } } return typeExpression; }