Macro to a constraint name.

@param     nameType constraint type
@param     nbr unique number for this constraint type

@return unique          name for constraint
@throws EngineException
168725
private function acquireConstraintName($nameType, $nbr)
    {
        $inputs = array();
        $inputs[] = $this->getDatabase();
        $inputs[] = $this->getCommonName();
        $inputs[] = $nameType;
        $inputs[] = $nbr;

        return NameFactory::generateName(NameFactory::CONSTRAINT_GENERATOR, $inputs);
    }
850033
private NameInfo getNameInfoForName(String name, SymbolType type) {
    Map<String, NameInfo> map = type == PROPERTY ? propertyNameInfo : varNameInfo;
    if (map.containsKey(name)) {
      return map.get(name);
    } else {
      NameInfo nameInfo = new NameInfo(name);
      map.put(name, nameInfo);
      symbolGraph.createNode(nameInfo);
      return nameInfo;
    }
  }
927604
@Override
  public String computeFullName(String name) {
    String fullname;
    DataSchema schema = DataSchemaUtil.typeStringToPrimitiveDataSchema(name);
    if (schema != null)
    {
      fullname = name;
    }
    else if (Name.isFullName(name) || getCurrentNamespace().isEmpty())
    {
      fullname = name;  // already a fullname
    }
    else if (currentImports.containsKey(name)) {
      // imported names are higher precedence than names in current namespace
      fullname = currentImports.get(name).getFullName();
    }
    else
    {
      fullname = getCurrentNamespace() + "." + name; // assumed to be in current namespace
    }
    return fullname;
  }
74406
public static Field forName(Class cl, String name) {
        java.lang.reflect.Field result;

        try {
            result = cl.getDeclaredField(name);
        } catch (NoSuchFieldException e) {
            return null;
        }

        return create(result);
    }
417249
public static <T extends NamedElement> ElementMatcher.Junction<T> namedIgnoreCase(String name) {
        return new NameMatcher<T>(new StringMatcher(name, StringMatcher.Mode.EQUALS_FULLY_IGNORE_CASE));
    }
86014
static String safeName(String name) {
      if (name == null) {
        return null;
      }
      boolean prevCharIsUnderscore = false;
      StringBuilder safeNameBuilder = new StringBuilder(name.length());
      if (!name.isEmpty() && Character.isDigit(name.charAt(0))) {
        // prevent a numeric prefix.
        safeNameBuilder.append("_");
      }
      for (char nameChar : name.toCharArray()) {
        boolean isUnsafeChar = !JmxCollector.isLegalCharacter(nameChar);
        if ((isUnsafeChar || nameChar == '_')) {
          if (prevCharIsUnderscore) {
            continue;
          } else {
            safeNameBuilder.append("_");
            prevCharIsUnderscore = true;
          }
        } else {
          safeNameBuilder.append(nameChar);
          prevCharIsUnderscore = false;
        }
      }

      return safeNameBuilder.toString();
    }
1231103
private BaseDescr namedConsequence( CEDescrBuilder< ? , ? > ce, NamedConsequenceDescrBuilder<?> namedConsequence ) throws RecognitionException {
        if ( namedConsequence == null ) {
            namedConsequence = helper.start( (DescrBuilder< ? , ? >) ce,
                                              NamedConsequenceDescrBuilder.class,
                                              null );
        }

        try {
            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.DO,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            match( input,
                   DRL5Lexer.LEFT_SQUARE,
                   null,
                   null,
                   DroolsEditorType.SYMBOL );
            if ( state.failed ) return null;

            Token label = match( input,
                                 DRL5Lexer.ID,
                                 null,
                                 null,
                                 DroolsEditorType.SYMBOL );
            if ( state.failed ) return null;

            namedConsequence.name( label.getText() );

            match( input,
                   DRL5Lexer.RIGHT_SQUARE,
                   null,
                   null,
                   DroolsEditorType.SYMBOL );
            if ( state.failed ) return null;
        } finally {
            helper.end( NamedConsequenceDescrBuilder.class,
                        namedConsequence );
        }
        return namedConsequence.getDescr();
    }
740525
int getConstraintIndex(String constraintName) {

        for (int i = 0, size = constraintList.length; i < size; i++) {
            if (constraintList[i].getName().name.equals(constraintName)) {
                return i;
            }
        }

        return -1;
    }
743750
public UniqueConstraint build(String name, boolean isPK) {
			ImmutableList<Attribute> attributes = builder.build();
			if (attributes.isEmpty())
				return null;
			return new UniqueConstraint(name, isPK, builder.build());
		}
1162237
public int getNameAndTypeIndex(String name, String descriptor)
    {
        for (ConstantInfo ci : listConstantInfo(NameAndType.class))
        {
            NameAndType nat = (NameAndType) ci;
            int nameIndex = nat.getName_index();
            String str = getString(nameIndex);
            if (name.equals(str))
            {
                int descriptorIndex = nat.getDescriptor_index();
                String descr = getString(descriptorIndex);
                if (descriptor.equals(descr))
                {
                    return constantPoolIndexMap.get(ci);
                }
            }
        }
        return -1;
    }
159416
public void setName(NameExpr name) {
        if (this.name != null) {
            updateReferences(this.name);
        }
        this.name = name;
        setAsParentNodeOf(name);
    }
930188
static NameConstraintsExtension mergeNameConstraints(
        X509Certificate currCert, NameConstraintsExtension prevNC)
        throws CertPathValidatorException
    {
        X509CertImpl currCertImpl;
        try {
            currCertImpl = X509CertImpl.toImpl(currCert);
        } catch (CertificateException ce) {
            throw new CertPathValidatorException(ce);
        }

        NameConstraintsExtension newConstraints =
            currCertImpl.getNameConstraintsExtension();

        if (debug != null) {
            debug.println("prevNC = " + prevNC +
                        ", newNC = " + String.valueOf(newConstraints));
        }

        // if there are no previous name constraints, we just return the
        // new name constraints.
        if (prevNC == null) {
            if (debug != null) {
                debug.println("mergedNC = " + String.valueOf(newConstraints));
            }
            if (newConstraints == null) {
                return newConstraints;
            } else {
                // Make sure we do a clone here, because we're probably
                // going to modify this object later and we don't want to
                // be sharing it with a Certificate object!
                return (NameConstraintsExtension)newConstraints.clone();
            }
        } else {
            try {
                // after merge, prevNC should contain the merged constraints
                prevNC.merge(newConstraints);
            } catch (IOException ioe) {
                throw new CertPathValidatorException(ioe);
            }
            if (debug != null) {
                debug.println("mergedNC = " + prevNC);
            }
            return prevNC;
        }
    }
421946
public TagHandler createTagHandler(String ns, String localName, TagConfig tag) throws FacesException
    {
        if (containsNamespace(ns))
        {
            TagHandlerFactory f = _factories.get(localName);
            if (f != null)
            {
                return f.createHandler(tag);
            }
        }
        
        return null;
    }
929964
private String annotationName(Annotation annotation) {
        if (annotation.annotationType().isAssignableFrom(Named.class)) {
            return ((Named) annotation).value();
        } else if ("javax.inject.Named".equals(annotation.annotationType().getName())) {
            return Jsr330Helper.getNamedValue(annotation);
        } else {
            return null;
        }
    }
145463
public ISarlAnnotationTypeBuilder addSarlAnnotationType(String name) {
		ISarlAnnotationTypeBuilder builder = this.iSarlAnnotationTypeBuilderProvider.get();
		builder.eInit(getSarlAgent(), name, getTypeResolutionContext());
		return builder;
	}
654194
public ObjectName createCustomComponentMBeanName(final String type, final String name) {
    ObjectName result = null;
    String tmp = jmxDomainName + ":" +
                 "type=" + sanitizeString(type) +
                 ",name=" + sanitizeString(name);
    try {
      result = new ObjectName(tmp);
    } catch (MalformedObjectNameException e) {
      error("Couldn't create ObjectName from: " + type + " , " + name);
    }
    return result;
  }
1268456
public JBBPNumericField remove(final JBBPNamedFieldInfo nameInfo) {
    JBBPUtils.assertNotNull(nameInfo, "Name info must not be null");
    return this.fieldMap.remove(nameInfo);
  }