public class PasswordCallback extends Object implements Callback, Serializable
Constructor and Description |
---|
PasswordCallback(String prompt)
Construct a
PasswordCallback with a prompt. |
PasswordCallback(String prompt,
String defaultPassword)
Construct a
PasswordCallback with a prompt and default password. |
Modifier and Type | Method and Description |
---|---|
String |
getDefaultPassword()
Get the default password.
|
String |
getPassword()
Get the retrieved password.
|
String |
getPrompt()
Get the prompt.
|
void |
setPassword(String pw)
Set the retrieved password.
|
public PasswordCallback(String prompt)
PasswordCallback
with a prompt.prompt
- the prompt used to request the name.IllegalArgumentException
- if prompt
is null.public PasswordCallback(String prompt, String defaultPassword)
PasswordCallback
with a prompt and default password.
prompt
- the prompt used to request the information.
defaultPassword
- the name to be used as the default name displayed with the
prompt.IllegalArgumentException
- if prompt
is null.public String getPrompt()
public String getDefaultPassword()
null
if this PasswordCallback
was
not instantiated with a defaultPassword
.public void setPassword(String pw)
pw
- the password (which may be null).getPassword()
public String getPassword()
setPassword(java.lang.String)
Copyright © 2004–2020 Eclipse Foundation. All rights reserved.