code: public String[] getAttributeNames()
     {
  
        Set<String> attributes = userState.getAttributeNames();
  
        String[] names = new String[attributes.size()];
        int i = 0;
        for (String name : attributes)
        {
           names[i++] = name;
        }
        return names;
     }
docs: {@inheritDoc}