Codota Logo
EntryType
Code IndexAdd Codota to your IDE (free)

How to use
EntryType
in
com.linecorp.centraldogma.common

Best Java code snippets using com.linecorp.centraldogma.common.EntryType (Showing top 20 results out of 315)

  • Common ways to obtain EntryType
private void myMethod () {
EntryType e =
  • Codota IconString path;EntryType.guessFromPath(path)
  • Codota IconEntry entry;entry.type()
  • Smart code suggestions by Codota
}
origin: line/centraldogma

final EntryType entryType = EntryType.guessFromPath(targetPath);
final String content;
try {
origin: line/centraldogma

@Override
public int hashCode() {
  return (revision.hashCode() * 31 + type.hashCode()) * 31 + content.hashCode();
}
origin: line/centraldogma

/**
 * Creates a new instance.
 */
private MergedEntry(Revision revision, EntryType type, T content, Iterable<String> paths) {
  this.revision = requireNonNull(revision, "revision");
  this.type = requireNonNull(type, "type");
  requireNonNull(content, "content");
  final Class<?> entryType = type.type();
  checkArgument(entryType.isAssignableFrom(content.getClass()),
         "content type: %s (expected: %s)", content.getClass(), entryType);
  this.content = content;
  this.paths = ImmutableList.copyOf(requireNonNull(paths, "paths"));
}
origin: line/centraldogma

static EntryDto convert(Entry<?> entry) {
  final EntryDto dto = new EntryDto();
  dto.setRevision(entry.revision().text());
  dto.setPath(entry.path());
  dto.setType(entry.type().name());
  dto.setContent(entry.contentAsText());
  return dto;
}
origin: com.linecorp.centraldogma/centraldogma-server

static EntryDto convert(Entry<?> entry) {
  final EntryDto dto = new EntryDto();
  dto.setRevision(entry.revision().text());
  dto.setPath(entry.path());
  dto.setType(entry.type().name());
  dto.setContent(entry.contentAsText());
  return dto;
}
origin: com.linecorp.centraldogma/centraldogma-common-shaded

final EntryType entryType = EntryType.guessFromPath(targetPath);
final String content;
try {
origin: com.linecorp.centraldogma/centraldogma-common

/**
 * Creates a new instance.
 */
private MergedEntry(Revision revision, EntryType type, T content, Iterable<String> paths) {
  this.revision = requireNonNull(revision, "revision");
  this.type = requireNonNull(type, "type");
  requireNonNull(content, "content");
  final Class<?> entryType = type.type();
  checkArgument(entryType.isAssignableFrom(content.getClass()),
         "content type: %s (expected: %s)", content.getClass(), entryType);
  this.content = content;
  this.paths = ImmutableList.copyOf(requireNonNull(paths, "paths"));
}
origin: com.linecorp.centraldogma/centraldogma-common

@Override
public int hashCode() {
  return (revision.hashCode() * 31 + type.hashCode()) * 31 + path.hashCode();
}
origin: com.linecorp.centraldogma/centraldogma-server-shaded

static EntryDto convert(Entry<?> entry) {
  final EntryDto dto = new EntryDto();
  dto.setRevision(entry.revision().text());
  dto.setPath(entry.path());
  dto.setType(entry.type().name());
  dto.setContent(entry.contentAsText());
  return dto;
}
origin: com.linecorp.centraldogma/centraldogma-common

final EntryType entryType = EntryType.guessFromPath(targetPath);
final String content;
try {
origin: line/centraldogma

/**
 * Creates a new instance.
 *
 * @param revision the revision of the entry
 * @param path the path of the entry
 * @param type the type of given {@code content}
 * @param content an object of given type {@code T}
 */
private Entry(Revision revision, String path, EntryType type, @Nullable T content) {
  requireNonNull(revision, "revision");
  checkArgument(!revision.isRelative(), "revision: %s (expected: absolute revision)", revision);
  this.revision = revision;
  this.path = requireNonNull(path, "path");
  this.type = requireNonNull(type, "type");
  final Class<?> entryContentType = type.type();
  if (entryContentType == Void.class) {
    checkArgument(content == null, "content: %s (expected: null)", content);
    this.content = null;
  } else {
    @SuppressWarnings("unchecked")
    final T castContent = (T) entryContentType.cast(requireNonNull(content, "content"));
    this.content = castContent;
  }
}
origin: com.linecorp.centraldogma/centraldogma-common-shaded

@Override
public int hashCode() {
  return (revision.hashCode() * 31 + type.hashCode()) * 31 + path.hashCode();
}
origin: line/centraldogma

final EntryType entryType = EntryType.guessFromPath(path);
if (fetchContent) {
  final byte[] content = reader.open(treeWalk.getObjectId(0)).getBytes();
origin: com.linecorp.centraldogma/centraldogma-common

/**
 * Creates a new instance.
 *
 * @param revision the revision of the entry
 * @param path the path of the entry
 * @param type the type of given {@code content}
 * @param content an object of given type {@code T}
 */
private Entry(Revision revision, String path, EntryType type, @Nullable T content) {
  requireNonNull(revision, "revision");
  checkArgument(!revision.isRelative(), "revision: %s (expected: absolute revision)", revision);
  this.revision = revision;
  this.path = requireNonNull(path, "path");
  this.type = requireNonNull(type, "type");
  final Class<?> entryContentType = type.type();
  if (entryContentType == Void.class) {
    checkArgument(content == null, "content: %s (expected: null)", content);
    this.content = null;
  } else {
    @SuppressWarnings("unchecked")
    final T castContent = (T) entryContentType.cast(requireNonNull(content, "content"));
    this.content = castContent;
  }
}
origin: com.linecorp.centraldogma/centraldogma-common

@Override
public int hashCode() {
  return (revision.hashCode() * 31 + type.hashCode()) * 31 + content.hashCode();
}
origin: com.linecorp.centraldogma/centraldogma-server

final EntryType entryType = EntryType.guessFromPath(path);
if (fetchContent) {
  final byte[] content = reader.open(treeWalk.getObjectId(0)).getBytes();
origin: com.linecorp.centraldogma/centraldogma-common-shaded

/**
 * Creates a new instance.
 *
 * @param revision the revision of the entry
 * @param path the path of the entry
 * @param type the type of given {@code content}
 * @param content an object of given type {@code T}
 */
private Entry(Revision revision, String path, EntryType type, @Nullable T content) {
  requireNonNull(revision, "revision");
  checkArgument(!revision.isRelative(), "revision: %s (expected: absolute revision)", revision);
  this.revision = revision;
  this.path = requireNonNull(path, "path");
  this.type = requireNonNull(type, "type");
  final Class<?> entryContentType = type.type();
  if (entryContentType == Void.class) {
    checkArgument(content == null, "content: %s (expected: null)", content);
    this.content = null;
  } else {
    @SuppressWarnings("unchecked")
    final T castContent = (T) entryContentType.cast(requireNonNull(content, "content"));
    this.content = castContent;
  }
}
origin: line/centraldogma

@Override
public int hashCode() {
  return (revision.hashCode() * 31 + type.hashCode()) * 31 + path.hashCode();
}
origin: com.linecorp.centraldogma/centraldogma-server-shaded

final EntryType entryType = EntryType.guessFromPath(path);
if (fetchContent) {
  final byte[] content = reader.open(treeWalk.getObjectId(0)).getBytes();
origin: line/centraldogma

switch (EntryType.guessFromPath(localPath)) {
  case JSON:
    final JsonNode jsonNode = Jackson.readTree(content);
com.linecorp.centraldogma.commonEntryType

Javadoc

The type of an Entry.

Most used methods

  • guessFromPath
    Guesses the EntryType from the specified path.
  • hashCode
  • name
  • type
    Returns the type of the content returned by Entry#content().

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Reference (javax.naming)
  • JList (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now