String attributeValue = null; if (value instanceof BooleanAttributeValue) { attributeValue = ((BooleanAttributeValue) value).getValue().toString(); } else if (value instanceof CharAttributeValue) { attributeValue = "'" + ((CharAttributeValue) value).getValue().toString() + "'";
final boolean castValue = ((BooleanAttributeValue) value).getValue(); final BooleanLiteralExpr convertedValue = new BooleanLiteralExpr(castValue); return new MemberValuePair(value.getName().getSymbolName(), convertedValue);
/** * Return an instance of the Metadata offered by this add-on */ @Override protected ItdTypeDetailsProvidingMetadataItem getMetadata( String metadataIdentificationString, JavaType aspectName, PhysicalTypeMetadata governorPhysicalTypeMetadata, String itdFilename) { // We know governor type details are non-null and can be safely cast ClassOrInterfaceTypeDetails controllerDetails = (ClassOrInterfaceTypeDetails) governorPhysicalTypeMetadata .getMemberHoldingTypeDetails(); Validate.notNull( controllerDetails, "Governor failed to provide class type details, in violation of superclass contract"); AnnotationMetadata stringTrimmerAnnotation = MemberFindingUtils .getAnnotationOfType(controllerDetails.getAnnotations(), GVNIX_STRING_TRIMMER_BINDER); boolean emptyAsNull = ((BooleanAttributeValue) stringTrimmerAnnotation .getAttribute(new JavaSymbolName("emptyAsNull"))).getValue() .booleanValue(); // Pass dependencies required by the metadata in through its constructor return new StringTrimmerBinderMetadata(metadataIdentificationString, aspectName, governorPhysicalTypeMetadata, emptyAsNull); }
String attributeValue = null; if (value instanceof BooleanAttributeValue) { attributeValue = ((BooleanAttributeValue) value).getValue().toString(); } else if (value instanceof CharAttributeValue) { attributeValue = "'" + ((CharAttributeValue) value).getValue().toString() + "'";
if (!exported.getValue()) {
if (!exported.getValue()) {
headerAttributeValue = new BooleanAttributeValue( new JavaSymbolName("header"), headerAttributeValue.getValue());
headerAttributeValue = new BooleanAttributeValue( new JavaSymbolName("webResultHeader"), headerAttributeValue.getValue());