}
public FeatureStructure createFS(Type type) {
final int typeCode = ((TypeImpl) type).getCode();
if (!isCreatableType(typeCode)) {
CASRuntimeException e = new CASRuntimeException(CASRuntimeException.NON_CREATABLE_TYPE,
new String[] { type.getName(), "CAS.createFS()" });
throw e;
}
final int addr = ll_createFS(typeCode);
final TypeSystemImpl ts = this.svd.casMetadata.ts;
final boolean isAnnot = ts.subsumes(ts.annotBaseTypeCode, typeCode);
if (isAnnot && (this == this.getBaseCAS())) {
CASRuntimeException e = new CASRuntimeException(
CASRuntimeException.DISALLOW_CREATE_ANNOTATION_IN_BASE_CAS,
new String[] { type.getName() });
throw e;
}
if (isAnnot) {