@Override public boolean matches(Descriptor d) { if (d.getQualifiers().contains(InjectionTarget.class.getName())) { List<String> list = d.getMetadata().get("target"); if (list != null && list.get(0).equals(targetName)) { return true; } } return false; } }
@Override public Map<String, List<String>> getMetadata() { return baseDescriptor.getMetadata(); }
@Override public Map<String, List<String>> getMetadata() { return baseDescriptor.getMetadata(); }
@Override public Map<String, List<String>> getMetadata() { return baseDescriptor.getMetadata(); }
@Override public boolean matches(Descriptor d) { Map<String, List<String>> metadata = d.getMetadata(); List<String> values = metadata.get(metadataKey); if (values == null) { return false; } return values.contains(archiveType); }
/** * Gets one value from a metadata field from the given descriptor * * @param d The non-null descriptor from which to get the first value in the given field * @param field The non-null field to get the first value of * @return The first value in the given field, or null if no such field exists in the descriptor */ public static String getOneMetadataField(Descriptor d, String field) { Map<String, List<String>> metadata = d.getMetadata(); List<String> values = metadata.get(field); if (values == null || values.isEmpty()) return null; return values.get(0); }
/** * Gets one value from a metadata field from the given descriptor * * @param d The non-null descriptor from which to get the first value in the given field * @param field The non-null field to get the first value of * @return The first value in the given field, or null if no such field exists in the descriptor */ public static String getOneMetadataField(Descriptor d, String field) { Map<String, List<String>> metadata = d.getMetadata(); List<String> values = metadata.get(field); if (values == null || values.isEmpty()) return null; return values.get(0); }
private static String getMetadataValue(Descriptor d, String key) { Map<String, List<String>> metadata = d.getMetadata(); List<String> values = metadata.get(key); if (values == null || values.size() <= 0) { return null; } return values.get(0); }
@Override public boolean matches(Descriptor d) { List<String> mAliasVals = d.getMetadata().get(AliasDescriptor.ALIAS_METADATA_MARKER); if (mAliasVals == null || mAliasVals.isEmpty()) return false; String aliasVal = mAliasVals.get(0); return values.contains(aliasVal); }
@Override public boolean matches(Descriptor d) { List<String> mAliasVals = d.getMetadata().get(AliasDescriptor.ALIAS_METADATA_MARKER); if (mAliasVals == null || mAliasVals.isEmpty()) return false; String aliasVal = mAliasVals.get(0); return values.contains(aliasVal); }
@Override public boolean matches(Descriptor d) { Map<String, List<String>> metadata = d.getMetadata(); List<String> handlerForList = metadata.get(AnnotationHandler.ANNOTATION_HANDLER_METADATA); if (handlerForList == null || handlerForList.isEmpty()) return false; String descriptorForThis = handlerForList.get(0); return descriptorForThis.equals(forThis.getName()); }
/** * Gets one value from a metadata field from the given descriptor * * @param d The non-null descriptor from which to get the first value in the given field * @param field The non-null field to get the first value of * @return The first value in the given field, or null if no such field exists in the descriptor */ public static String getOneMetadataField(Descriptor d, String field) { Map<String, List<String>> metadata = d.getMetadata(); List<String> values = metadata.get(field); if (values == null || values.isEmpty()) return null; return values.get(0); }
@Override public boolean matches(Descriptor d) { List<String> mAliasVals = d.getMetadata().get(AliasDescriptor.ALIAS_METADATA_MARKER); if (mAliasVals == null || mAliasVals.isEmpty()) return false; String aliasVal = mAliasVals.get(0); return values.contains(aliasVal); }
@Override public boolean matches(Descriptor d) { List<String> mAliasVals = d.getMetadata().get(AliasDescriptor.ALIAS_METADATA_MARKER); if (mAliasVals == null || mAliasVals.isEmpty()) return false; String aliasVal = mAliasVals.get(0); return values.contains(aliasVal); }
@Override public boolean matches(Descriptor d) { Map<String, List<String>> metadata = d.getMetadata(); List<String> handlerForList = metadata.get(AnnotationHandler.ANNOTATION_HANDLER_METADATA); if (handlerForList == null || handlerForList.isEmpty()) return false; String descriptorForThis = handlerForList.get(0); return descriptorForThis.equals(forThis.getName()); }
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(); }
@Override public boolean matches(Descriptor d) { if (d.getQualifiers().contains(InjectionTarget.class.getName())) { List<String> list = d.getMetadata().get("target"); if (list != null && list.get(0).equals(targetName)) { return true; } } return false; } }