com.google.code.validationframework.swing.dataprovider
Class JPasswordFieldPasswordProvider

java.lang.Object
  extended by com.google.code.validationframework.swing.dataprovider.JPasswordFieldPasswordProvider
All Implemented Interfaces:
com.google.code.validationframework.api.dataprovider.DataProvider<char[]>

public class JPasswordFieldPasswordProvider
extends Object
implements com.google.code.validationframework.api.dataprovider.DataProvider<char[]>

Data provider retrieving the text from a password field.
For stronger security, it is recommended that the returned character array be cleared after use by the validation rules by setting each character to zero.

See Also:
DataProvider, JPasswordField

Constructor Summary
JPasswordFieldPasswordProvider(JPasswordField passwordField)
          Constructor specifying the password field to get the text from.
 
Method Summary
 JPasswordField getComponent()
          Gets the component providing the data to be validated.
 char[] getData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPasswordFieldPasswordProvider

public JPasswordFieldPasswordProvider(JPasswordField passwordField)
Constructor specifying the password field to get the text from.

Parameters:
passwordField - Password field to get the text from.
Method Detail

getComponent

public JPasswordField getComponent()
Gets the component providing the data to be validated.

Returns:
Component providing the data to be validated.

getData

public char[] getData()
Specified by:
getData in interface com.google.code.validationframework.api.dataprovider.DataProvider<char[]>
See Also:
DataProvider, JPasswordField.getPassword()


Copyright © 2013. All Rights Reserved.