List of usage examples for org.eclipse.jdt.internal.compiler.lookup LookupEnvironment getTypeFromConstantPoolName
ReferenceBinding getTypeFromConstantPoolName(char[] signature, int start, int end, boolean isParameterized, char[][][] missingTypeNames)
From source file:org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.AbstractAttribute.java
License:Open Source License
/** * Resolve a type from its constant pool name. * * @param environment for the actual resolving. * @param constantPoolName as read from the attribute * @param missingTypeNames names of those types that were missing when compiling the current type * @return resolved type//from w w w . j av a 2 s. com */ protected ReferenceBinding getResolvedType(LookupEnvironment environment, char[] constantPoolName, char[][][] missingTypeNames) { ReferenceBinding type = environment.getTypeFromConstantPoolName(constantPoolName, 0, -1, false, missingTypeNames); // FIXME(GENERIC): determine last parameter! if (type instanceof UnresolvedReferenceBinding) type = resolveReferenceType(environment, (UnresolvedReferenceBinding) type); return type; }
From source file:org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.OTSpecialAccessAttribute.java
License:Open Source License
@Override public void evaluate(Binding binding, LookupEnvironment environment, char[][][] missingTypeNames) { checkBindingMismatch(binding, 0);/*w w w .ja v a 2 s .co m*/ this._site = (ReferenceBinding) binding; // don't see a need to evaluate all this: // for (TeamFieldDesc field : _teamFields) // field.evaluate(binding, environment); if (((ReferenceBinding) binding).isRole()) ((ReferenceBinding) binding).roleModel.setSpecialAccess(this); if (this._baseclassNames != null) for (int i = 0; i < this._baseclassNames.size(); i++) { char[] name = this._baseclassNames.get(i); if (name != null && name.length > 0) if (this._baseclassDecapsulation.get(i).booleanValue()) this._adaptedBaseclasses .add(environment.getTypeFromConstantPoolName(name, 0, -1, false, missingTypeNames)); } }
From source file:org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.RoleLocalTypesAttribute.java
License:Open Source License
public void evaluate(Binding binding, LookupEnvironment environment, char[][][] missingTypeNames) { checkBindingMismatch(binding, ExtraCompilerModifiers.AccRole); this._localTypes = new ReferenceBinding[this._count]; ReferenceBinding refBinding = (ReferenceBinding) binding; RoleModel role = refBinding.roleModel; if (role == null) refBinding.roleModel = role = new RoleModel(refBinding); for (int i = 0; i < this._names.length; i++) { this._localTypes[i] = environment.getTypeFromConstantPoolName(this._names[i], 0, -1, false, missingTypeNames); //FIXME(GENERIC): check param 'false'! if (this._localTypes[i] instanceof UnresolvedReferenceBinding) this._localTypes[i] = resolveReferenceType(environment, (UnresolvedReferenceBinding) this._localTypes[i]); role.addBinaryLocalType(this._localTypes[i]); }/*from ww w . ja v a 2 s . c om*/ }