@Test( expected = NullPointerException.class ) public void testGetReferencedGroupsWithoutElement() { attrCore.getReferencedGroups( metaData, null, null ); }
public String[] getReferencedGroups( final AttributeMetaData metaData, final ReportElement element, final Object attributeValue ) { final String valueRole = metaData.getValueRole(); if ( element == null ) { throw new NullPointerException(); } if ( attributeValue == null ) { return EMPTY; } if ( "Group".equals( valueRole ) ) { if ( attributeValue instanceof String[] ) { final String[] attrVal = (String[]) attributeValue; return attrVal.clone(); } return new String[] { String.valueOf( attributeValue ) }; } return EMPTY; }
DefaultAttributeCore implements AttributeCore { public String[] getReferencedGroups( final AttributeMetaData metaData, final ReportElement element, final Object attributeValue ) { final String valueRole = metaData.getValueRole(); if ( element == null ) { throw new NullPointerException(); } if ( attributeValue == null ) { return EMPTY; } if ( "Group".equals( valueRole ) ) { if ( attributeValue instanceof String[] ) { final String[] attrVal = (String[]) attributeValue; return attrVal.clone(); } return new String[] { String.valueOf( attributeValue ) }; } return EMPTY; } }
DefaultAttributeCore implements AttributeCore { public String[] getReferencedGroups( final AttributeMetaData metaData, final ReportElement element, final Object attributeValue ) { final String valueRole = metaData.getValueRole(); if ( element == null ) { throw new NullPointerException(); } if ( attributeValue == null ) { return EMPTY; } if ( "Group".equals( valueRole ) ) { if ( attributeValue instanceof String[] ) { final String[] attrVal = (String[]) attributeValue; return attrVal.clone(); } return new String[] { String.valueOf( attributeValue ) }; } return EMPTY; } DefaultAttributeCore(); }
DefaultAttributeCore implements AttributeCore { public String[] getReferencedGroups( final AttributeMetaData metaData, final ReportElement element, final Object attributeValue ) { final String valueRole = metaData.getValueRole(); if ( element == null ) { throw new NullPointerException(); } if ( attributeValue == null ) { return EMPTY; } if ( "Group".equals( valueRole ) ) { if ( attributeValue instanceof String[] ) { final String[] attrVal = (String[]) attributeValue; return attrVal.clone(); } return new String[] { String.valueOf( attributeValue ) }; } return EMPTY; } DefaultAttributeCore(); String[] getReferencedFields( final AttributeMetaData metaData, final ReportElement element,
      final Object attributeValue ); String[] getReferencedGroups( final AttributeMetaData metaData, final ReportElement element,
      final Object attributeValue ); ResourceReference[] getReferencedResources( final AttributeMetaData metaData, final ReportElement element,
      final ResourceManager resourceManager, final Object attributeValue ); String[] getExtraCalculationFields( final AttributeMetaData metaData ); }
DefaultAttributeCore implements AttributeCore { public String[] getReferencedGroups( final AttributeMetaData metaData, final ReportElement element, final Object attributeValue ) { final String valueRole = metaData.getValueRole(); if ( element == null ) { throw new NullPointerException(); } if ( attributeValue == null ) { return EMPTY; } if ( "Group".equals( valueRole ) ) { if ( attributeValue instanceof String[] ) { final String[] attrVal = (String[]) attributeValue; return attrVal.clone(); } return new String[] { String.valueOf( attributeValue ) }; } return EMPTY; } DefaultAttributeCore(); String[] getReferencedFields( final AttributeMetaData metaData, final ReportElement element,
      final Object attributeValue ); String[] getReferencedGroups( final AttributeMetaData metaData, final ReportElement element,
      final Object attributeValue ); ResourceReference[] getReferencedResources( final AttributeMetaData metaData, final ReportElement element,
      final ResourceManager resourceManager, final Object attributeValue ); String[] getExtraCalculationFields( final AttributeMetaData metaData );  }