br.com.objectos.git
Class RefName

java.lang.Object
  extended by br.com.objectos.git.RefName
All Implemented Interfaces:
br.com.objectos.core.object.ToStringObject

public abstract class RefName
extends Object
implements br.com.objectos.core.object.ToStringObject

Represents the name of a Git reference.

Since:
1

Field Summary
static RefName MASTER
          The refs/heads/master reference.
 
Method Summary
 void formatToString(StringBuilder sb, int depth)
           
static RefName namedBranch(String name)
          Creates a new RefName representing a named branch.
abstract  String print()
          Returns the name of this reference.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MASTER

public static final RefName MASTER
The refs/heads/master reference.

Method Detail

namedBranch

public static RefName namedBranch(String name)
Creates a new RefName representing a named branch.

For example, if RefName.namedBranch("test") is invoked, then the returned RefName will represent the Git reference refs/heads/test.

Parameters:
name - the name of the branch
Returns:
a new RefName representing a named branch.

formatToString

public final void formatToString(StringBuilder sb,
                                 int depth)
Specified by:
formatToString in interface br.com.objectos.core.object.ToStringObject

print

public abstract String print()
Returns the name of this reference.

Returns:
the name of this reference

toString

public final String toString()
Overrides:
toString in class Object


Copyright © 2020–2022 Objectos Software LTDA. All rights reserved.