Returns the correct string for a given composite type.

    @raises InvalidCompositeTypeError
190619
def to_string(comp_type):
    '''

    '''
    if comp_type == NONE:
        return NONE
    elif comp_type== PERIODIC_EC_SHARED:
        return PERIODC_EC_SHARED
    elif comp_type == PERIODIC_STATE_SHARED:
        return PERIODIC_STATE_SHARED
    elif comp_type == GROUPING:
        return GROUPING
    elif comp_type == FSM_EC_SHARED:
        return FSM_EC_SHARED
    elif comp_type == FSM_STATE_SHARED:
        return FSM_STATE_SHARED
    else:
        raise InvalidCompositeTypeError(type_string)
1197114
private void getCompositeIdEmbeddables(EmbeddableType embeddable, List compositeEmbeddables, MetamodelImpl metaModel)
    {
        compositeEmbeddables.add(embeddable.getJavaType().getSimpleName());

        for (Object column : embeddable.getAttributes())
        {

            Attribute columnAttribute = (Attribute) column;
            Field f = (Field) columnAttribute.getJavaMember();

            if (columnAttribute.getJavaType().isAnnotationPresent(Embeddable.class))
            {
                getCompositeIdEmbeddables(metaModel.embeddable(columnAttribute.getJavaType()), compositeEmbeddables,
                        metaModel);
            }
        }
    }
48265
@Override
    public <T extends Composite<S>> T copy() {
        try {
            String fullJSON = fullMapper.writeValueAsString(this);
            @SuppressWarnings("unchecked")
            T copy = (T) fullMapper.readValue(fullJSON, getClass());
            return copy;
        } catch (IOException e) {
            throw new RuntimeException("The attempted copy of an object failed.", e);
        }
    }
491971
@Nullable
  static String parseResourceType(@Nullable String rawEnvType) {
    if (rawEnvType != null && !rawEnvType.isEmpty()) {
      Utils.checkArgument(isValidAndNotEmpty(rawEnvType), "Type" + ERROR_MESSAGE_INVALID_CHARS);
      return rawEnvType.trim();
    }
    return rawEnvType;
  }
772814
def IsComposite(self):
    
    return bool(self.condition) or (
        self.member_data_type_definition and
        self.member_data_type_definition.IsComposite())
634276
function Tree(type) {
    abstractions.Composite.call(this, type);
    if (!utilities.types.isProcedural(type)) {
        throw new utilities.Exception({
            $module: '/bali/composites/Tree',
            $procedure: '$Tree',
            $exception: '$invalidParameter',
            $parameter: utilities.types.symbolForType(type),
            $text: '"An invalid tree type was passed to the constructor."'
        });
    }

    // the array is a private attribute so methods that use it are defined in the constructor
    const array = [];

    this.toArray = function() {
        return array.slice(); // copy the array
    };

    this.getSize = function() {
        return array.length;
    };

    this.addChild = function(child) {
        array.push(child);
        child.getParent = function() { return this; };
    };

    this.getChild = function(index) {
        index = this.normalizeIndex(index) - 1;  // JS uses zero based indexing
        return array[index];
    };

    this.getParent = function() { };  // will be reset by parent when added as a child

    return this;
}
1116457
@SuppressWarnings("unchecked")
  public <S extends AbstractCompositeController<?, ?, ?>> S getComposite(String name) {
    return (S) this.getComposites()
                   .get(name);
  }
809704
def type_string(self):
        """"""
        if self.is_tuple:
            subtypes = [item.type_string for item in self.children]
            return '{}({})'.format(
                '' if self.val_guaranteed else '*',
                ', '.join(subtypes))
        elif self.is_list:
            return '{}[{}]'.format(
                '' if self.val_guaranteed else '*',
                self.children[0].type_string)
        else:
            return '{}{}'.format(
                '' if self.val_guaranteed else '*',
                self.type_.__name__)
1188892
static String actualTypeParametersString(TypeElement type) {
    List<? extends TypeParameterElement> typeParameters = type.getTypeParameters();
    if (typeParameters.isEmpty()) {
      return "";
    } else {
      return typeParameters
          .stream()
          .map(e -> e.getSimpleName().toString())
          .collect(joining(", ", "<", ">"));
    }
  }
1211186
def getTypeStr(_type):
  
  """
  if isinstance(_type, CustomType):
    return str(_type)

  if hasattr(_type, '__name__'):
    return _type.__name__

  return ''
812323
public static List<String> getCompositeTypeList(Environment environment) {
		return Binder.get(environment)
				.bind("spring.cloud.config.server", CompositeConfig.class).get()
				.getComposite().stream().map(map -> (String) map.get("type"))
				.collect(Collectors.toList());
	}
227446
private Object getFormatter() {
        Object f = iFormatter;

        if (f == null) {
            if (iElementPairs.size() == 2) {
                Object printer = iElementPairs.get(0);
                Object parser = iElementPairs.get(1);

                if (printer != null) {
                    if (printer == parser || parser == null) {
                        f = printer;
                    }
                } else {
                    f = parser;
                }
            }

            if (f == null) {
                f = new Composite(iElementPairs);
            }

            iFormatter = f;
        }

        return f;
    }
386563
public static String prepareCompositeKey(final EntityMetadata m, final Object compositeKey)
    {
        Field[] fields = m.getIdAttribute().getBindableJavaType().getDeclaredFields();

        StringBuilder stringBuilder = new StringBuilder();
        for (Field f : fields)
        {
            if (!ReflectUtils.isTransientOrStatic(f))
            {
                try
                {
                    String fieldValue = PropertyAccessorHelper.getString(compositeKey, f);

                    // what if field value is null????
                    stringBuilder.append(fieldValue);
                    stringBuilder.append(COMPOSITE_KEY_SEPERATOR);
                }
                catch (IllegalArgumentException e)
                {
                    logger.error("Error during prepare composite key, Caused by {}.", e);
                    throw new PersistenceException(e);
                }
            }
        }

        if (stringBuilder.length() > 0)
        {
            stringBuilder.deleteCharAt(stringBuilder.lastIndexOf(COMPOSITE_KEY_SEPERATOR));
        }
        return stringBuilder.toString();
    }
377581
private void useCompositeCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_useCompositeCheckActionPerformed
        // TODO add your handling code here:
        if (useCompositeCheck.isSelected()) {
            compositeLabel.setEnabled(true);
            compositeInputField.setEnabled(true);
            addCompositeButton.setEnabled(true);
        } else {
            compositeLabel.setEnabled(false);
            compositeInputField.setEnabled(false);
            addCompositeButton.setEnabled(false);
        }
        encodeData();
    }
742610
def get(cls, resolvable_string, options_builder=None, interpreter=None):
    
    options_builder = options_builder or ResolverOptionsBuilder()
    for resolvable_impl in cls._REGISTRY:
      try:
        return resolvable_impl.from_string(resolvable_string,
                                           options_builder,
                                           interpreter=interpreter)
      except cls.InvalidRequirement:
        continue
    raise cls.InvalidRequirement('Unknown requirement type: %s' % resolvable_string)
1150316
private String getTypeString(Type type) {
        String typeQualifiedName = type.qualifiedTypeName().replaceFirst("^java\\.lang\\.", "");
        typeQualifiedName = typeQualifiedName.replaceFirst("^com\\.qspin\\.qtaste\\.testsuite\\.(QTaste\\w*Exception)", "$1");
        String typeDocFileName = null;
        if (typeQualifiedName.startsWith("com.qspin.")) {
            String javaDocDir = typeQualifiedName.startsWith("com.qspin.qtaste.") ? QTaste_JAVADOC_URL_PREFIX :
                  SUT_JAVADOC_URL_PREFIX;
            typeDocFileName = javaDocDir + typeQualifiedName.replace('.', '/') + ".html";
        }
        String typeString = typeQualifiedName;
        if (typeDocFileName != null) {
            typeString = "<A HREF=\"" + typeDocFileName + "\">" + typeString + "</A>";
        }
        if (type.asParameterizedType() != null) {
            ParameterizedType parametrizedType = type.asParameterizedType();
            final Type[] parameterTypes = parametrizedType.typeArguments();
            if (parameterTypes.length > 0) {
                String[] parametersTypeStrings = new String[parameterTypes.length];
                for (int i = 0; i < parameterTypes.length; i++) {
                    parametersTypeStrings[i] = getTypeString(parameterTypes[i]);
                }
                typeString += "&lt;" + Strings.join(parametersTypeStrings, ",") + "&gt;";
            }
        }
        typeString += type.dimension();

        return typeString;
    }
75452
private function tpl(): string
    {
        if (interface_exists($this->type)) {
            return 'Return value of %s must implement interface %s, %s returned';
        }

        if (class_exists($this->type)) {
            return 'Return value of %s must be an instance of %s, %s returned';
        }

        if ($this->type == 'callable') {
            return 'Return value of %s must be %s, %s returned';
        }

        return 'Return value of %s must be of the type %s, %s returned';
    }