public static < T > SimpleExpression < T > asSimple ( Expression < T > expr ) { Expression < T > underlyingMixin = ExpressionUtils . extract ( expr ) ; if ( underlyingMixin instanceof PathImpl ) { return new SimplePath < T > ( ( PathImpl < T > ) underlyingMixin ) ; } else if ( underlyingMixin instanceof OperationImpl ) { return new SimpleOperation < T > ( ( OperationImpl < T > ) underlyingMixin ) ; } else if ( underlyingMixin instanceof TemplateExpressionImpl ) { return new SimpleTemplate < T > ( ( TemplateExpressionImpl < T > ) underlyingMixin ) ; } else { return new SimpleExpression < T > ( underlyingMixin ) { private static final long serialVersionUID = - 8712299418891960222L ; @ Override public < R , C > R accept ( Visitor < R , C > v , C context ) { return this . mixin . accept ( v , context ) ; } } ; } }
Create a new SimpleExpression