public boolean isEqualTo(ITypeBinding binding) { if (binding == null) return false; return binding.getKey().equals(fBindingKey); }
public boolean isEqualTo(ITypeBinding binding) { if (binding == null) return false; return binding.getKey().equals(fBindingKey); }
@Override public Long getSerialVersionId(ITypeBinding binding) { return fIdsTable.get(binding.getKey()); }
@Override public RawBindingVariable makeRawBindingVariable(ITypeBinding binding) { String key = binding.getKey(); if (! fRawBindingMap.containsKey(key)){ fRawBindingMap.put(key, new RawBindingVariable(binding)); if (REPORT) nrCreated++; } else { if (REPORT) nrRetrieved++; } if (REPORT) dumpConstraintStats(); return fRawBindingMap.get(key); }
public TType createTType(ITypeBinding typeBinding) { String key= typeBinding.getKey(); TType cached= fTTypeCache.get(key); if (cached != null) return cached; TType type= fTypeEnvironment.create(typeBinding); fTTypeCache.put(key, type); return type; }
@Override public final boolean visit(TypeParameter parameter) { ITypeBinding binding= parameter.resolveBinding(); if (binding != null) { // don't collect type parameters declared inside the anonymous fBindings.put(binding.getKey(), binding); } return false; }
public TType createTType(ITypeBinding typeBinding) { String key= typeBinding.getKey(); TType cached= (TType) fTTypeCache.get(key); if (cached != null) return cached; TType type= fTypeEnvironment.create(typeBinding); fTTypeCache.put(key, type); return type; }
public RawBindingVariable makeRawBindingVariable(ITypeBinding binding) { String key = binding.getKey(); if (! fRawBindingMap.containsKey(key)){ fRawBindingMap.put(key, new RawBindingVariable(binding)); if (REPORT) nrCreated++; } else { if (REPORT) nrRetrieved++; } if (REPORT) dumpConstraintStats(); return (RawBindingVariable)fRawBindingMap.get(key); }
@Override public RawBindingVariable makeRawBindingVariable(ITypeBinding binding) { String key = binding.getKey(); if (! fRawBindingMap.containsKey(key)){ fRawBindingMap.put(key, new RawBindingVariable(binding)); if (REPORT) nrCreated++; } else { if (REPORT) nrRetrieved++; } if (REPORT) dumpConstraintStats(); return fRawBindingMap.get(key); }
@Override public final boolean visit(final SimpleName node) { Assert.isNotNull(node); final ITypeBinding binding= node.resolveTypeBinding(); if (binding != null && binding.isTypeVariable() && !fBindings.containsKey(binding.getKey())) { fBindings.put(binding.getKey(), binding); fFound.add(binding); } return true; }
public final boolean visit(final SimpleName node) { Assert.isNotNull(node); final ITypeBinding binding= node.resolveTypeBinding(); if (binding != null && binding.isTypeVariable() && !fBindings.containsKey(binding.getKey())) { fBindings.put(binding.getKey(), binding); fFound.add(binding); } return true; }
@Override public final boolean visit(final SimpleName node) { Assert.isNotNull(node); final ITypeBinding binding= node.resolveTypeBinding(); if (binding != null && binding.isTypeVariable() && !fBindings.containsKey(binding.getKey())) { fBindings.put(binding.getKey(), binding); fFound.add(binding); } return true; }
public TType createTType(ITypeBinding typeBinding) { String key= typeBinding.getKey(); TType cached= fTTypeCache.get(key); if (cached != null) return cached; TType type= fTypeEnvironment.create(typeBinding); fTTypeCache.put(key, type); return type; }
/** * @param parentCv the parent constraint variable * @param typeVariable the type variable for this constraint * @param declarationTypeVariableIndex */ public CollectionElementVariable2(ConstraintVariable2 parentCv, ITypeBinding typeVariable, int declarationTypeVariableIndex) { super(null); fParentCv= parentCv; if (! typeVariable.isTypeVariable()) throw new IllegalArgumentException(typeVariable.toString()); fTypeVariableKey= typeVariable.getKey(); fDeclarationTypeVariableIndex= declarationTypeVariableIndex; }
public CollectionElementVariable2 getElementVariable(ConstraintVariable2 constraintVariable, ITypeBinding typeVariable) { Assert.isTrue(typeVariable.isTypeVariable()); // includes null check HashMap typeVarToElementVars= (HashMap) constraintVariable.getData(INDEXED_COLLECTION_ELEMENTS); if (typeVarToElementVars == null) return null; return (CollectionElementVariable2) typeVarToElementVars.get(typeVariable.getKey()); }
/** * Answer the given types's signature in class file format. * @param type binding representing a type * @return a signature in class file format */ public static String extractGenericTypeSignature(ITypeBinding type) { KeyToSignature parser = new KeyToSignature(type.getKey(), KeyToSignature.SIGNATURE, true); parser.parse(); return parser.toString(); }
/** * Answer the given types's signature in class file format. * @param type binding representing a type * @return a signature in class file format */ public static String extractGenericTypeSignature(ITypeBinding type) { KeyToSignature parser = new KeyToSignature(type.getKey(), KeyToSignature.SIGNATURE, true); parser.parse(); return parser.toString(); }
/** * Answer the given types's signature in class file format. * @param type binding representing a type * @return a signature in class file format */ public static String extractGenericTypeSignature(ITypeBinding type) { KeyToSignature parser = new KeyToSignature(type.getKey(), KeyToSignature.SIGNATURE, true); parser.parse(); return parser.toString(); }
private CaptureType createCaptureType(ITypeBinding binding) { IJavaProject javaProject= binding.getDeclaringClass().getJavaElement().getJavaProject(); String bindingKey= binding.getKey(); ProjectKeyPair pair= new ProjectKeyPair(javaProject, bindingKey); CaptureType result= (CaptureType)fCaptureTypes.get(pair); if (result != null) return result; result= new CaptureType(this); fCaptureTypes.put(pair, result); result.initialize(binding, javaProject); return result; } }
private CaptureType createCaptureType(ITypeBinding binding) { IJavaProject javaProject= binding.getDeclaringClass().getJavaElement().getJavaProject(); String bindingKey= binding.getKey(); ProjectKeyPair pair= new ProjectKeyPair(javaProject, bindingKey); CaptureType result= fCaptureTypes.get(pair); if (result != null) return result; result= new CaptureType(this); fCaptureTypes.put(pair, result); result.initialize(binding, javaProject); return result; } }