You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2017/03/27 15:40:21 UTC

svn commit: r1788958 - /uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemUtils.java

Author: schor
Date: Mon Mar 27 15:40:21 2017
New Revision: 1788958

URL: http://svn.apache.org/viewvc?rev=1788958&view=rev
Log:
[UIMA-5387] add back missing method in TypeSystemUtils for classifyType.

Modified:
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemUtils.java

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemUtils.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemUtils.java?rev=1788958&r1=1788957&r2=1788958&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemUtils.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeSystemUtils.java Mon Mar 27 15:40:21 2017
@@ -414,4 +414,17 @@ public abstract class TypeSystemUtils {
     return PathValid.NEVER;
   }
 
+  /**
+   * Classify types into FS type, array type etc. For the full list of return types, see the
+   * <code>LowLevelCAS.TYPE_CLASS*</code> constants, as well as the documentation for
+   * {@link LowLevelCAS#ll_getTypeClass(int) LowLevelCAS.ll_getTypeClass(int)}.
+   * 
+   * @param type
+   *                The type to classify.
+   * @return An integer encoding the the type class. See above.
+   */
+  public static final int classifyType(Type type) {
+    return TypeSystemImpl.getTypeClass((TypeImpl) type);
+  }
+
 }