Class CredentialItem.StringType

  extended by org.eclipse.jgit.transport.CredentialItem
      extended by org.eclipse.jgit.transport.CredentialItem.StringType
Direct Known Subclasses:
Enclosing class:

public static class CredentialItem.StringType
extends CredentialItem

An item whose value is stored as a string. When working with secret data, consider CredentialItem.CharArrayType instead, as the internal members of the array can be cleared, reducing the chances that the password is left in memory after authentication is completed.

Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.transport.CredentialItem
CredentialItem.CharArrayType, CredentialItem.InformationalMessage, CredentialItem.Password, CredentialItem.StringType, CredentialItem.Username, CredentialItem.YesNoType
Constructor Summary
CredentialItem.StringType(String promptText, boolean maskValue)
          Initialize a prompt for a single string.
Method Summary
 void clear()
          Clear the stored value, destroying it as much as possible.
 String getValue()
 void setValue(String newValue)
Methods inherited from class org.eclipse.jgit.transport.CredentialItem
getPromptText, isValueSecure
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public CredentialItem.StringType(String promptText,
                                 boolean maskValue)
Initialize a prompt for a single string.

promptText - prompt to display to the user alongside of the input field. Should be sufficient text to indicate what to supply for this item.
maskValue - true if the value should be masked from displaying during input. This should be true for passwords and other secrets, false for names and other public data.
Method Detail


public void clear()
Description copied from class: CredentialItem
Clear the stored value, destroying it as much as possible.

Specified by:
clear in class CredentialItem


public String getValue()
the current value


public void setValue(String newValue)
newValue -

Copyright © 2013. All Rights Reserved.