Package org.eclipse.jdt.internal.compiler.lookup

Examples of org.eclipse.jdt.internal.compiler.lookup.SyntheticMethodBinding


                if (begin == -1) {
                  begin = i;
                }
                count++;
                if (count > ENUM_CONSTANTS_THRESHOLD) {
                  SyntheticMethodBinding syntheticMethod = declaringType.binding.addSyntheticMethodForEnumInitialization(begin, i);
                  codeStream.invoke(Opcodes.OPC_invokestatic, syntheticMethod, null /* default declaringClass */);
                  begin = i;
                  count = 1;
                }
              } else {
                remainingFieldCount++;
              }
            }
          }
          if (count != 0) {
            // add last synthetic method
            SyntheticMethodBinding syntheticMethod = declaringType.binding.addSyntheticMethodForEnumInitialization(begin, max);
            codeStream.invoke(Opcodes.OPC_invokestatic, syntheticMethod, null /* default declaringClass */);
          }
        }
      } else if (fieldDeclarations != null) {
        for (int i = 0, max = fieldDeclarations.length; i < max; i++) {
View Full Code Here


            } else {
              // could occur if !valueRequired but compliance >= 1.4
              codeStream.pop();
            }
          } else {
            SyntheticMethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
            if (accessor == null) {
              TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);
              if (isStatic) {
                codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
              } else {
View Full Code Here

  reportOnlyUselesslyReadPrivateField(currentScope, lastFieldBinding, valueRequired);
  boolean isFirst = lastFieldBinding == this.binding
    && (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType()))
    && this.otherBindings == null; // could be dup: next.next.next
  TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);     
  SyntheticMethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
  if (lastFieldBinding.isStatic()) {
    if (accessor == null) {
      codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
    } else {
      codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
 
View Full Code Here

  reportOnlyUselesslyReadPrivateField(currentScope, lastFieldBinding, valueRequired);
  boolean isFirst = lastFieldBinding == this.binding
    && (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType()))
    && this.otherBindings == null; // could be dup: next.next.next
  TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);     
  SyntheticMethodBinding accessor = this.syntheticReadAccessors == null
      ? null
      : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
  if (lastFieldBinding.isStatic()) {
    if (accessor == null) {
      codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
View Full Code Here

            } else {
              // could occur if !valueRequired but compliance >= 1.4
              codeStream.pop();
            }
          } else {
            SyntheticMethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
            if (accessor == null) {
              TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);
              if (isStatic) {
                codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
              } else {
View Full Code Here

  reportOnlyUselesslyReadPrivateField(currentScope, lastFieldBinding, valueRequired);
  boolean isFirst = lastFieldBinding == this.binding
    && (this.indexOfFirstFieldBinding == 1 || lastFieldBinding.declaringClass == currentScope.enclosingReceiverType())
    && this.otherBindings == null; // could be dup: next.next.next
  TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);     
  SyntheticMethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
  if (lastFieldBinding.isStatic()) {
    if (accessor == null) {
      codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
    } else {
      codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
 
View Full Code Here

  reportOnlyUselesslyReadPrivateField(currentScope, lastFieldBinding, valueRequired);
  boolean isFirst = lastFieldBinding == this.binding
    && (this.indexOfFirstFieldBinding == 1 || lastFieldBinding.declaringClass == currentScope.enclosingReceiverType())
    && this.otherBindings == null; // could be dup: next.next.next
  TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);     
  SyntheticMethodBinding accessor = this.syntheticReadAccessors == null
      ? null
      : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
  if (lastFieldBinding.isStatic()) {
    if (accessor == null) {
      codeStream.fieldAccess(Opcodes.OPC_getstatic, lastFieldBinding, constantPoolDeclaringClass);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.lookup.SyntheticMethodBinding

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.