use of com.google.devtools.j2objc.types.GeneratedPackageElement in project j2objc by google.
the class BindingConverter method unwrapGeneratedElement.
private static IBinding unwrapGeneratedElement(GeneratedElement element) {
IBinding binding = generatedBindingCache.get(element);
if (binding != null) {
return binding;
}
if (element instanceof GeneratedVariableElement) {
binding = new GeneratedVariableBinding((GeneratedVariableElement) element);
generatedBindingCache.put(element, binding);
return binding;
}
if (element instanceof GeneratedExecutableElement) {
binding = new GeneratedMethodBinding((GeneratedExecutableElement) element);
generatedBindingCache.put(element, binding);
return binding;
}
if (element instanceof GeneratedTypeElement) {
throw new AssertionError("not supported");
}
if (element instanceof GeneratedPackageElement) {
binding = new GeneratedPackageBinding(((GeneratedPackageElement) element).getName());
generatedBindingCache.put(element, binding);
return binding;
}
throw new AssertionError("unknown generated element kind");
}
Aggregations