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 2018/01/16 16:12:13 UTC
svn commit: r1821261 -
/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java
Author: schor
Date: Tue Jan 16 16:12:13 2018
New Revision: 1821261
URL: http://svn.apache.org/viewvc?rev=1821261&view=rev
Log:
no Jira, compute once the jcas class name for a particular type and cache it in the type system impl.
Modified:
uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java
Modified: uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java
URL: http://svn.apache.org/viewvc/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java?rev=1821261&r1=1821260&r2=1821261&view=diff
==============================================================================
--- uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java (original)
+++ uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java Tue Jan 16 16:12:13 2018
@@ -57,6 +57,7 @@ public class TypeImpl implements Type, C
private final String name; // x.y.Foo
private final String shortName; // Foo
+ private final String jcasClassName; // chande prefix, maybe
private final short typeCode; // subtypes always have typecodes > this one and < typeCodeNextSibling
private short depthFirstCode; // assigned at commit time
@@ -169,6 +170,7 @@ public class TypeImpl implements Type, C
private TypeImpl() {
this.name = null;
this.shortName = null;
+ this.jcasClassName = null;
this.superType = null;
this.isInheritanceFinal = false;
@@ -203,6 +205,7 @@ public class TypeImpl implements Type, C
}
this.name = name;
+ this.jcasClassName = Misc.typeName2ClassName(name);
final int pos = this.name.lastIndexOf(TypeSystem.NAMESPACE_SEPARATOR);
this.shortName = (pos >= 0) ? this.name.substring(pos + 1) : name;
this.superType = supertype;
@@ -286,6 +289,11 @@ public class TypeImpl implements Type, C
return this.name;
}
+ public String getJCasClassName() {
+ return this.jcasClassName;
+ }
+
+
/**
* Get the super type.
*