@Override public void onFailure(final ErrorInformation error) throws MultiException { final String msg; switch (error.getErrorType()) { case FAILURE_TO_REIFY: msg = LocalizationMessages.HK_2_REIFICATION_ERROR( error.getDescriptor().getImplementation(), printStackTrace(error.getAssociatedException())); break; default: msg = LocalizationMessages.HK_2_UNKNOWN_ERROR(printStackTrace(error.getAssociatedException())); break; } try { Errors.warning(error.getInjectee(), msg); } catch (IllegalStateException ex) { Errors.process(new Runnable() { @Override public void run() { Errors.warning(this, LocalizationMessages.HK_2_FAILURE_OUTSIDE_ERROR_SCOPE()); Errors.warning(error.getInjectee(), msg); } }); } }
@Override public void onFailure(final ErrorInformation error) throws MultiException { final String msg; switch (error.getErrorType()) { case FAILURE_TO_REIFY: msg = LocalizationMessages.HK_2_REIFICATION_ERROR( error.getDescriptor().getImplementation(), printStackTrace(error.getAssociatedException())); break; default: msg = LocalizationMessages.HK_2_UNKNOWN_ERROR(printStackTrace(error.getAssociatedException())); break; } try { Errors.warning(error.getInjectee(), msg); } catch (IllegalStateException ex) { Errors.process(new Runnable() { @Override public void run() { Errors.warning(this, LocalizationMessages.HK_2_FAILURE_OUTSIDE_ERROR_SCOPE()); Errors.warning(error.getInjectee(), msg); } }); } }
@Override public String getImplementation() { return baseDescriptor.getImplementation(); }
@Override public String getImplementation() { return baseDescriptor.getImplementation(); }
@Override public boolean matches(Descriptor d) { return d.getImplementation().equals(cname); } });
@Override public String toString() { String descriptorString = (descriptor == null) ? "null" : descriptor.getImplementation(); return "ErrorInformationImpl(" + action + "," + descriptorString + "," + System.identityHashCode(this) + ")"; }
@Override public boolean matches(final Descriptor d) { final String clazz = d.getImplementation(); return clazz.startsWith("com.kaixin"); } };
/* package */ static String getBestContract(Descriptor d) { String impl = d.getImplementation(); Set<String> contracts = d.getAdvertisedContracts(); if (contracts.contains(impl)) return impl; for (String candidate : contracts) { return candidate; } return impl; }
/* package */ static String getBestContract(Descriptor d) { String impl = d.getImplementation(); Set<String> contracts = d.getAdvertisedContracts(); if (contracts.contains(impl)) return impl; for (String candidate : contracts) { return candidate; } return impl; }
/* package */ static String getBestContract(Descriptor d) { String impl = d.getImplementation(); Set<String> contracts = d.getAdvertisedContracts(); if (contracts.contains(impl)) return impl; for (String candidate : contracts) { return candidate; } return impl; }
/* package */ static String getBestContract(Descriptor d) { String impl = d.getImplementation(); Set<String> contracts = d.getAdvertisedContracts(); if (contracts.contains(impl)) return impl; for (String candidate : contracts) { return candidate; } return impl; }
@Override public Filter getFilter() { final List<String> managedTypes = Lists.transform(contextDebugService.getManagedTypes(), Class::getName); return d -> d.getDescriptorType() == DescriptorType.CLASS && managedTypes.contains(d.getImplementation()); }
@Override public Filter getFilter() { final List<String> managedTypes = Lists.transform(contextDebugService.getManagedTypes(), Class::getName); return d -> d.getDescriptorType() == DescriptorType.CLASS && managedTypes.contains(d.getImplementation()); }
private ImplOnlyKey(Descriptor desc) { impl = desc.getImplementation(); type = desc.getDescriptorType(); hash = impl.hashCode() ^ type.hashCode(); }
private static void checkDescriptor(Descriptor d) { if (d == null) throw new IllegalArgumentException(); if (d.getImplementation() == null) throw new IllegalArgumentException(); if (d.getAdvertisedContracts() == null) throw new IllegalArgumentException(); if (d.getDescriptorType() == null) throw new IllegalArgumentException(); if (d.getDescriptorVisibility() == null) throw new IllegalArgumentException(); if (d.getMetadata() == null) throw new IllegalArgumentException(); if (d.getQualifiers() == null) throw new IllegalArgumentException(); }
private static void checkDescriptor(Descriptor d) { if (d == null) throw new IllegalArgumentException(); if (d.getImplementation() == null) throw new IllegalArgumentException(); if (d.getAdvertisedContracts() == null) throw new IllegalArgumentException(); if (d.getDescriptorType() == null) throw new IllegalArgumentException(); if (d.getDescriptorVisibility() == null) throw new IllegalArgumentException(); if (d.getMetadata() == null) throw new IllegalArgumentException(); if (d.getQualifiers() == null) throw new IllegalArgumentException(); }
private static void checkDescriptor(Descriptor d) { if (d == null) throw new IllegalArgumentException(); if (d.getImplementation() == null) throw new IllegalArgumentException(); if (d.getAdvertisedContracts() == null) throw new IllegalArgumentException(); if (d.getDescriptorType() == null) throw new IllegalArgumentException(); if (d.getDescriptorVisibility() == null) throw new IllegalArgumentException(); if (d.getMetadata() == null) throw new IllegalArgumentException(); if (d.getQualifiers() == null) throw new IllegalArgumentException(); }
private static void checkDescriptor(Descriptor d) { if (d == null) throw new IllegalArgumentException(); if (d.getImplementation() == null) throw new IllegalArgumentException(); if (d.getAdvertisedContracts() == null) throw new IllegalArgumentException(); if (d.getDescriptorType() == null) throw new IllegalArgumentException(); if (d.getDescriptorVisibility() == null) throw new IllegalArgumentException(); if (d.getMetadata() == null) throw new IllegalArgumentException(); if (d.getQualifiers() == null) throw new IllegalArgumentException(); }
/** * The given descriptor was processing during a * cancellation of the job * * @param d The non-null descriptor that was cancelled */ public WasCancelledException(Descriptor d) { super("A run-level service with name \"" + ((d.getName() == null) ? "" : d.getName()) + "\" and implementation " + d.getImplementation() + " was cancelled"); }
@Override public boolean matches(Descriptor d) { if (d.getImplementation().equals(impl) && d.getDescriptorType().equals(descriptorImpl.getDescriptorType())) { return true; } return false; }