List of usage examples for org.eclipse.jdt.internal.compiler.lookup NestedTypeBinding syntheticEnclosingInstances
public SyntheticArgumentBinding[] syntheticEnclosingInstances()
From source file:org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.ConstantPoolObjectReader.java
License:Open Source License
public FieldBinding findFieldByName(ReferenceBinding clazz, char[] name) { char[] prefix = TypeConstants.SYNTHETIC_ENCLOSING_INSTANCE_PREFIX; if (CharOperation.prefixEquals(prefix, name)) { TypeBinding original = clazz.original(); if (original instanceof NestedTypeBinding) { if (original.isMemberType() || original.isLocalType()) { NestedTypeBinding ntb = (NestedTypeBinding) original; SyntheticArgumentBinding[] sab = ntb.syntheticEnclosingInstances(); for (int i = 0; i < sab.length; i++) { if (CharOperation.equals(name, sab[i].name)) return sab[i].matchingField; }//from w ww . j a va2s . c o m } } // no name adjustment or synthetics needed at the reading (source) side. } // either regular field or synthetic in a BinaryTypeBinding: return clazz.getField(name, true); }