public static String[] asOptionalStringArray(AnnotationInstance annotation, String property) { AnnotationValue value = annotation.value(property); return value == null ? new String[0] : value.asStringArray(); }
@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { String[] values = annotationInstance.value().asStringArray(); for (int i = 0; i < values.length; i++) { values[i] = propertyReplacer.replaceProperties(values[i]); } return values; } }
@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { String[] values = annotationInstance.value().asStringArray(); for (int i = 0; i < values.length; i++) { values[i] = propertyReplacer.replaceProperties(values[i]); } return values; } }
@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { String[] values = annotationInstance.value().asStringArray(); for (int i = 0; i < values.length; i++) { values[i] = propertyReplacer.replaceProperties(values[i]); } return values; } }
AnnotationValue urlPatternsValue = annotation.value("urlPatterns"); if (urlPatternsValue != null) { for (String urlPattern : urlPatternsValue.asStringArray()) { urlPatterns.add(urlPattern); for (String urlPattern : urlPatternsValue.asStringArray()) { urlPatterns.add(urlPattern); AnnotationValue urlPatternsValue = annotation.value("urlPatterns"); if (urlPatternsValue != null) { for (String urlPattern : urlPatternsValue.asStringArray()) { urlPatterns.add(urlPattern); for (String urlPattern : urlPatternsValue.asStringArray()) { urlPatterns.add(urlPattern); for (String servletName : servletNamesValue.asStringArray()) { servletNames.add(servletName); for (String role : annotation.value().asStringArray()) { SecurityRoleMetaData sr = new SecurityRoleMetaData(); sr.setRoleName(role); for (String role : rolesAllowedValue.asStringArray()) { rolesAllowed.add(role); rolesAllowed = new ArrayList<String>(); if (rolesAllowedValue != null) { for (String role : rolesAllowedValue.asStringArray()) {
@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance) { return annotationInstance.value().asStringArray(); } }
public static String[] asOptionalStringArray(AnnotationInstance annotation, String property) { AnnotationValue value = annotation.value(property); return value == null ? new String[0] : value.asStringArray(); }
@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance) { return annotationInstance.value().asStringArray(); } }
@Override protected String[] fromAnnotation(final AnnotationInstance annotationInstance) { return annotationInstance.value().asStringArray(); } }
private String[] asArray(final AnnotationInstance annotation, String property) { AnnotationValue value = annotation.value(property); return value == null ? null : value.asStringArray(); }
public static String[] asOptionalStringArray(AnnotationInstance annotation, String property) { AnnotationValue value = annotation.value(property); return value == null ? new String[0] : value.asStringArray(); }
private List<String> determineSynchronizedTableNames() { final AnnotationInstance synchronizeAnnotation = JandexHelper.getSingleAnnotation( getClassInfo(), HibernateDotNames.SYNCHRONIZE ); if ( synchronizeAnnotation != null ) { final String[] tableNames = synchronizeAnnotation.value().asStringArray(); return Arrays.asList( tableNames ); } else { return Collections.emptyList(); } }
private List<String> determineSynchronizedTableNames() { final AnnotationInstance synchronizeAnnotation = JandexHelper.getSingleAnnotation( getClassInfo(), HibernateDotNames.SYNCHRONIZE ); if ( synchronizeAnnotation != null ) { final String[] tableNames = synchronizeAnnotation.value().asStringArray(); return Arrays.asList( tableNames ); } else { return Collections.emptyList(); } }
public boolean addConditionally(DeploymentUnit depUnit, CamelDeploymentSettings.Builder depSettingsBuilder, URL fileURL) { boolean skipResource = false; CompositeIndex index = depUnit.getAttachment(Attachments.COMPOSITE_ANNOTATION_INDEX); // [#1215] Add support for Spring based CamelContext injection for (AnnotationInstance aninst : index.getAnnotations(DotName.createSimple("org.apache.camel.cdi.ImportResource"))) { for (String resname : aninst.value().asStringArray()) { skipResource |= fileURL.getPath().endsWith(resname); } } if (skipResource == false) { depSettingsBuilder.camelContextUrl(fileURL); return true; } return false; }
public boolean addConditionally(DeploymentUnit depUnit, CamelDeploymentSettings.Builder depSettingsBuilder, URL fileURL) { boolean skipResource = false; CompositeIndex index = depUnit.getAttachment(Attachments.COMPOSITE_ANNOTATION_INDEX); // [#1215] Add support for Spring based CamelContext injection for (AnnotationInstance aninst : index.getAnnotations(DotName.createSimple("org.apache.camel.cdi.ImportResource"))) { for (String resname : aninst.value().asStringArray()) { skipResource |= fileURL.getPath().endsWith(resname); } } if (skipResource == false) { depSettingsBuilder.camelContextUrl(fileURL); return true; } return false; }
private void createUniqueConstraints(AnnotationInstance tableAnnotation, String tableName) { AnnotationValue value = tableAnnotation.value( "uniqueConstraints" ); if ( value == null ) { return; } AnnotationInstance[] uniqueConstraints = value.asNestedArray(); for ( AnnotationInstance unique : uniqueConstraints ) { String name = unique.value( "name" ) == null ? null : unique.value( "name" ).asString(); String[] columnNames = unique.value( "columnNames" ).asStringArray(); UniqueConstraintSourceImpl uniqueConstraintSource = new UniqueConstraintSourceImpl( name, tableName, Arrays.asList( columnNames ) ); constraintSources.add( uniqueConstraintSource ); } }
private void createUniqueConstraints(AnnotationInstance tableAnnotation, String tableName) { AnnotationValue value = tableAnnotation.value( "uniqueConstraints" ); if ( value == null ) { return; } AnnotationInstance[] uniqueConstraints = value.asNestedArray(); for ( AnnotationInstance unique : uniqueConstraints ) { String name = unique.value( "name" ) == null ? null : unique.value( "name" ).asString(); String[] columnNames = unique.value( "columnNames" ).asStringArray(); UniqueConstraintSourceImpl uniqueConstraintSource = new UniqueConstraintSourceImpl( name, tableName, Arrays.asList( columnNames ) ); constraintSources.add( uniqueConstraintSource ); } }
for (final AnnotationInstance allowedRole : allowedRoles) { if (allowedRole.target().equals(webServiceClassInfo)) { for (final String roleName : allowedRole.value().asStringArray()) { securityRoles.add(roleName); for (final AnnotationInstance declareRole : declareRoles) { if (declareRole.target().equals(webServiceClassInfo)) { for (final String roleName : declareRole.value().asStringArray()) { securityRoles.add(roleName);
for (final AnnotationInstance allowedRole : allowedRoles) { if (allowedRole.target().equals(webServiceClassInfo)) { for (final String roleName : allowedRole.value().asStringArray()) { securityRoles.add(roleName); for (final AnnotationInstance declareRole : declareRoles) { if (declareRole.target().equals(webServiceClassInfo)) { for (final String roleName : declareRole.value().asStringArray()) { securityRoles.add(roleName);
for (final AnnotationInstance allowedRole : allowedRoles) { if (allowedRole.target().equals(webServiceClassInfo)) { for (final String roleName : allowedRole.value().asStringArray()) { securityRoles.add(roleName); for (final AnnotationInstance declareRole : declareRoles) { if (declareRole.target().equals(webServiceClassInfo)) { for (final String roleName : declareRole.value().asStringArray()) { securityRoles.add(roleName);