org.eclipse.jdt.core.dom.ConditionalExpression

 

/**

 * The condition expression; lazily initialized; defaults to an unspecified,

 * but legal, expression.

 */

private Expression conditionExpression = null;

 

/**

 * The "then" expression; lazily initialized; defaults to an unspecified,

 * but legal, expression.

 */

private Expression thenExpression = null;

 

/**

 * The "else" expression; lazily initialized; defaults to an unspecified,

 * but legal, expression.

 */

private Expression elseExpression = null;

 

public Expression getExpression() {

      if (this.conditionExpression == null) {

            // lazy init must be thread-safe for readers

            synchronized (this) {

                  if (this.conditionExpression == null) {

                        preLazyInit();

                        this.conditionExpression = new SimpleName(this.ast);

                        postLazyInit(this.conditionExpression, EXPRESSION_PROPERTY);

                  }

            }

      }

      return this.conditionExpression;

}

 

 

 

public Expression getThenExpression() {

      if (this.thenExpression == null) {

            // lazy init must be thread-safe for readers

            synchronized (this) {

                  if (this.thenExpression == null) {

                        preLazyInit();

                        this.thenExpression = new SimpleName(this.ast);

                        postLazyInit(this.thenExpression, THEN_EXPRESSION_PROPERTY);

                  }

            }

      }

      return this.thenExpression;

}

 

 

 

public Expression getElseExpression() {

      if (this.elseExpression == null) {

            // lazy init must be thread-safe for readers

            synchronized (this) {

                  if (this.elseExpression == null) {

                        preLazyInit();

                        this.elseExpression = new SimpleName(this.ast);

                        postLazyInit(this.elseExpression, ELSE_EXPRESSION_PROPERTY);

                  }

            }

      }

      return this.elseExpression;

}