Converts {@link EntryType} to {@link com.linecorp.centraldogma.common.EntryType}.
508617
@Nullable
    public static com.linecorp.centraldogma.common.EntryType convertEntryType(EntryType type) {
        if (type == null) {
            return null;
        }

        switch (type) {
            case JSON:
                return com.linecorp.centraldogma.common.EntryType.JSON;
            case TEXT:
                return com.linecorp.centraldogma.common.EntryType.TEXT;
            case DIRECTORY:
                return com.linecorp.centraldogma.common.EntryType.DIRECTORY;
        }

        throw new Error();
    }
103081
public static <K, V> Map.Entry<K, V> immutableEntry(Map.Entry<K, V> entry) {
      return new ImmutableEntry<>(entry);
   }
449824
public static short toType(String strType) throws RegistryException {
	if (strType.equals(REGDWORD_TOKEN)) return RegistryEntry.TYPE_DWORD;
	else if (strType.equals(REGSTR_TOKEN)) return RegistryEntry.TYPE_STRING;
	else if (strType.equals(REGKEY_TOKEN)) return RegistryEntry.TYPE_KEY;
	throw new RegistryException(strType + " is not a valid Registry Type");
    }
808988
protected String getEntryType(int flags, boolean all) {

        for (int i = 0; i < getTypes(all).length; i++) {
            if ((flags & getTypesInt()[i]) > 0) {
                return getTypes(all)[i];
            }
        }
        return UNKNOWN_TYPE;
    }
1154592
private OriginalMapping getOriginalMappingForEntry(Entry entry) {
    if (entry.getSourceFileId() == UNMAPPED) {
      return null;
    } else {
      // Adjust the line/column here to be start at 1.
      Builder x = OriginalMapping.newBuilder()
        .setOriginalFile(sources[entry.getSourceFileId()])
        .setLineNumber(entry.getSourceLine() + 1)
        .setColumnPosition(entry.getSourceColumn() + 1);
      if (entry.getNameId() != UNMAPPED) {
        x.setIdentifier(names[entry.getNameId()]);
      }
      return x.build();
    }
  }
373659
public static <S, T> Convert<S, T> to(Typed<T> targetType, Position.Readable<S> sourcePosition) {
        return new Convert<>(sourcePosition, targetType.getType());
    }
429227
protected void findEntryPoint() {
        if (entryPoint == null) {
            StringBuilder path = new StringBuilder();
            Resource parent = resource;
            String name = null;
            while (parent != null && !ResourceUtil.CONTENT_NODE.equals(name = parent.getName())) {
                if (inheritanceType != Type.contentBased) {
                    if (path.length() > 0) {
                        path.insert(0, '/');
                    }
                    path.insert(0, name);
                }
                parent = parent.getParent();
            }
            if (inheritanceType != Type.nodeRelated && inheritanceType != Type.sameContent
                    && parent != null && ResourceUtil.CONTENT_NODE.equals(name)) {
                // the resource is a child of an element with a content subtree ('jcr:content/...')
                path.insert(0, '/');
                path.insert(0, ResourceUtil.CONTENT_NODE);
                relativePath = path.toString();
                entryPoint = parent.getParent();
            } else {
                // node inheritance or no content subtree ('jcr:content/...') detected...
                relativePath = "";
                entryPoint = resource.getParent();
                if (inheritanceType == Type.sameContent && parent != null && ResourceUtil.CONTENT_NODE.equals(name)) {
                    exitPoint = parent;
                }
            }
        }
    }
597593
@Deprecated
  public static <K, V> Function<Map.Entry<K, V>, V> getEntryValue() {
    return entryValueFunction();
  }
998152
@Override
  final public TraceMethod entry(String returnType, Object object, String methodSignature) {
    return null;
  }
1250273
public Set<Map.Entry<K,V>> entrySet()
  {
    if (TraceComponent.isAnyTracingEnabled() && _tc.isEntryEnabled()) SibTr.entry(this, _tc, "entrySet");
    
    UnsupportedOperationException uoe = new UnsupportedOperationException();
    
    if (TraceComponent.isAnyTracingEnabled() && _tc.isEntryEnabled()) SibTr.exit(this, _tc, "entrySet", uoe);
    throw uoe;
  }
1226778
public final EObject entryRuleTypeRef() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleTypeRef = null;


        try {
            // InternalXtext.g:923:48: (iv_ruleTypeRef= ruleTypeRef EOF )
            // InternalXtext.g:924:2: iv_ruleTypeRef= ruleTypeRef EOF
            {
             newCompositeNode(grammarAccess.getTypeRefRule()); 
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleTypeRef=ruleTypeRef();

            state._fsp--;

             current =iv_ruleTypeRef; 
            match(input,EOF,FollowSets000.FOLLOW_2); 

            }

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
1349497
static <K, V> Map.Entry<K, V> exportEntry(final OMVRBTreeEntry<K, V> omvrbTreeEntryPosition) {
    return omvrbTreeEntryPosition == null ? null : new OSimpleImmutableEntry<K, V>(omvrbTreeEntryPosition);
  }
1101067
public static Type toType(Class<?> clazz) {
		Type t = SQL_MAP_ABLE_TYPES.get(clazz);
		if (t == null)
			return Type.OTHER;
		else
			return t;
	}
845120
public static KAMStoreDaoImpl.AnnotationType convert(
            AnnotationType wsAnnotationType) throws InvalidIdException {

        String wsId = wsAnnotationType.getId();
        String wsName = wsAnnotationType.getName();
        String wsDescription = wsAnnotationType.getDescription();
        String wsUsage = wsAnnotationType.getUsage();
        AnnotationDefinitionType wsAdt =
                wsAnnotationType.getAnnotationDefinitionType();

        final int id =
                KamStoreObjectRef.decode(wsId,
                        KAMStoreDaoImpl.AnnotationType.class)
                        .getKamStoreObjectId();
        KAMStoreDaoImpl.AnnotationDefinitionType adt = convert(wsAdt);

        return new KAMStoreDaoImpl.AnnotationType(id, wsName, wsDescription,
                wsUsage, adt);
    }
772759
public EntryPointDeclarationDescr entryPointDeclaration(DeclareDescrBuilder ddb) throws RecognitionException {
        EntryPointDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start(ddb,
                    EntryPointDeclarationDescrBuilder.class,
                    null);

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.ENTRY,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            match(input,
                    DRL6Lexer.MINUS,
                    null,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.POINT,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            String ep = stringId();
            if (state.failed)
                return null;
            if (state.backtracking == 0) {
                declare.entryPointId(ep);
            }

            while (input.LA(1) == DRL6Lexer.AT) {
                // annotation*
                annotation(declare);
                if (state.failed)
                    return null;
            }

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.END,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

        } catch (RecognitionException re) {
            reportError(re);
        } finally {
            helper.end(EntryPointDeclarationDescrBuilder.class,
                    declare);
        }
        return (declare != null) ? declare.getDescr() : null;
    }
1153439
public static <S, T> Convert<S, T> to(Class<T> targetType, Position.Readable<S> sourcePosition) {
        return new Convert<>(sourcePosition, targetType);
    }
73505
public static Class<?> toIdType(EntityType entityType) {
    AttributeType attributeType = entityType.getIdAttribute().getDataType();
    //noinspection EnumSwitchStatementWhichMissesCases
    switch (attributeType) {
      case EMAIL:
      case HYPERLINK:
      case STRING:
        return String.class;
      case INT:
        return Integer.class;
      case LONG:
        return Long.class;
      default:
        throw new UnexpectedEnumException(attributeType);
    }
  }