Examples of canBeSeenBy()


Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

}
public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
  switch (this.bits & RestrictiveFlagMASK) {
    case Binding.FIELD : // assigning to a field
      FieldBinding codegenField = ((FieldBinding) this.binding).original();
      if (codegenField.canBeSeenBy(getReceiverType(currentScope), this, currentScope)) {
        super.generatePostIncrement(currentScope, codeStream, postIncrement, valueRequired);
      } else {
        if (codegenField.isStatic()) {
          codeStream.aconst_null();
        } else {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

  super(source, pos);
  this.evaluationContext = evaluationContext;
}
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
  FieldBinding codegenBinding = this.binding.original();
  if (codegenBinding.canBeSeenBy(this.actualReceiverType, this, currentScope)) {
    this.receiver.generateCode(currentScope, codeStream, !codegenBinding.isStatic());
    assignment.expression.generateCode(currentScope, codeStream, true);
    fieldStore(currentScope, codeStream, codegenBinding, null, this.actualReceiverType, this.receiver.isImplicitThis(), valueRequired);
  } else {
    codeStream.generateEmulationForField(codegenBinding);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

      Constant fieldConstant = codegenBinding.constant();
      if (fieldConstant == Constant.NotAConstant) {
        if (codegenBinding.declaringClass == null) { // array length
          codeStream.arraylength();
        } else {
          if (codegenBinding.canBeSeenBy(this.actualReceiverType, this, currentScope)) {
            TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
            if (isStatic) {
              codeStream.fieldAccess(Opcodes.OPC_getstatic , codegenBinding, constantPoolDeclaringClass);
            } else {
              codeStream.fieldAccess(Opcodes.OPC_getfield, codegenBinding, constantPoolDeclaringClass);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

}

public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
  boolean isStatic;
  FieldBinding codegenBinding = this.binding.original();
  if (codegenBinding.canBeSeenBy(this.actualReceiverType, this, currentScope)) {
    this.receiver.generateCode(currentScope, codeStream, !(isStatic = codegenBinding.isStatic()));
    TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
    if (isStatic) {
      codeStream.fieldAccess(Opcodes.OPC_getstatic, codegenBinding, constantPoolDeclaringClass);
    } else {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

  }
}
public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
  boolean isStatic;
  FieldBinding codegenBinding = this.binding.original();
  if (codegenBinding.canBeSeenBy(this.actualReceiverType, this, currentScope)) {
    super.generatePostIncrement(currentScope, codeStream, postIncrement, valueRequired);
  } else {
    this.receiver.generateCode(currentScope, codeStream, !(isStatic = codegenBinding.isStatic()));
    if (isStatic) {
      codeStream.aconst_null();
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

  if ((this.bits & Binding.VARIABLE) == 0) { // nothing to do if type ref
    codeStream.recordPositionsFrom(pc, this.sourceStart);
    return;
  }
  FieldBinding lastFieldBinding = this.otherBindings == null ? (FieldBinding) this.binding : this.otherBindings[this.otherBindings.length-1];
  if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) {
    super.generateCode(currentScope, codeStream, valueRequired);
    return;
  }
  lastFieldBinding = generateReadSequence(currentScope, codeStream);
  if (lastFieldBinding != null) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

/**
* Check and/or redirect the field access to the delegate receiver if any
*/
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
    FieldBinding lastFieldBinding = this.otherBindings == null ? (FieldBinding) this.binding : this.otherBindings[this.otherBindings.length-1];
  if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) {
    super.generateAssignment(currentScope, codeStream, assignment, valueRequired);
    return;
  }
  lastFieldBinding = generateReadSequence(currentScope, codeStream);
  codeStream.generateEmulationForField(lastFieldBinding);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

  }
}

public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
    FieldBinding lastFieldBinding = this.otherBindings == null ? (FieldBinding) this.binding : this.otherBindings[this.otherBindings.length-1];
  if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) {
    super.generateCompoundAssignment(currentScope, codeStream, expression, operator, assignmentImplicitConversion, valueRequired);
    return;
  }
  lastFieldBinding = generateReadSequence(currentScope, codeStream);
  if (lastFieldBinding.isStatic()){
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

  // value field receiver value
  codeStream.generateEmulatedWriteAccessForField(lastFieldBinding);
}
public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
    FieldBinding lastFieldBinding = this.otherBindings == null ? (FieldBinding) this.binding : this.otherBindings[this.otherBindings.length-1];
  if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) {
    super.generatePostIncrement(currentScope, codeStream, postIncrement, valueRequired);
    return;
  }
  lastFieldBinding = generateReadSequence(currentScope, codeStream);
  codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.FieldBinding.canBeSeenBy()

      // if first field is actually constant, we can inline it
      if (lastFieldBinding.constant() != Constant.NotAConstant) {
        break;
      }
      if (needValue) {
        if (lastFieldBinding.canBeSeenBy(this.actualReceiverType, this, currentScope)) {
          if (!lastFieldBinding.isStatic()) {
            if ((this.bits & DepthMASK) != 0) {
              ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((this.bits & DepthMASK) >> DepthSHIFT);
              Object[] emulationPath = currentScope.getEmulationPath(targetType, true /*only exact match*/, false/*consider enclosing arg*/);
              codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope);
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.