Examples of SyntheticMethodBinding


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

    }
    // add synthetic methods infos
    SyntheticMethodBinding[] syntheticMethods = this.referenceBinding.syntheticMethods();
    if (syntheticMethods != null) {
      for (int i = 0, max = syntheticMethods.length; i < max; i++) {
        SyntheticMethodBinding syntheticMethod = syntheticMethods[i];
        switch (syntheticMethod.kind) {
          case SyntheticMethodBinding.FieldReadAccess :
            // generate a method info to emulate an reading access to
            // a non-accessible field
            addSyntheticFieldReadAccessMethod(syntheticMethod);
View Full Code Here

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

            } 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) {
              if (isStatic) {
View Full Code Here

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

  int operator,
  int assignmentImplicitConversion,
  boolean valueRequired) {
   
  FieldBinding lastFieldBinding = generateReadSequence(currentScope, codeStream);
  SyntheticMethodBinding accessor =
    this.syntheticReadAccessors == null
      ? null
      : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
  if (lastFieldBinding.isStatic()) {
    if (accessor == null) {
View Full Code Here

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

  CodeStream codeStream,
  CompoundAssignment postIncrement,
  boolean valueRequired) {
   
  FieldBinding lastFieldBinding = generateReadSequence(currentScope, codeStream);
  SyntheticMethodBinding accessor =
    this.syntheticReadAccessors == null
      ? null
      : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
  if (lastFieldBinding.isStatic()) {
    if (accessor == null) {
View Full Code Here

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

public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FieldBinding fieldBinding, TypeBinding lastReceiverType,   int index, FlowInfo flowInfo) {

        //  AspectJ Extension
    if (index < 0) {
      if (fieldBinding.alwaysNeedsAccessMethod(false)) {
        SyntheticMethodBinding newBinding = fieldBinding.getAccessMethod(false);
        setSyntheticAccessor(fieldBinding,index,newBinding);
        FieldBinding originalField = fieldBinding.original();
        if (originalField != fieldBinding) {
          setCodegenBinding(index < 0 ? (this.otherBindings == null ? 0 : this.otherBindings.length) : index, originalField);
        }
        return;
      }
    } else {
      if (fieldBinding.alwaysNeedsAccessMethod(true)) {
        SyntheticMethodBinding newBinding = fieldBinding.getAccessMethod(true);
        setSyntheticAccessor(fieldBinding,index,newBinding);
        FieldBinding originalField = fieldBinding.original();
        if (originalField != fieldBinding) {
          setCodegenBinding(index < 0 ? (this.otherBindings == null ? 0 : this.otherBindings.length) : index, originalField);
        }
View Full Code Here

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 = 0;
                }
              }
            }
          }
          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

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

            } 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

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

  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

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

  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

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

    }
    // add synthetic methods infos
    SyntheticMethodBinding[] syntheticMethods = this.referenceBinding.syntheticMethods();
    if (syntheticMethods != null) {
      for (int i = 0, max = syntheticMethods.length; i < max; i++) {
        SyntheticMethodBinding syntheticMethod = syntheticMethods[i];
        switch (syntheticMethod.purpose) {
          case SyntheticMethodBinding.FieldReadAccess :
          case SyntheticMethodBinding.SuperFieldReadAccess :
            // generate a method info to emulate an reading access to
            // a non-accessible field
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.