Return a X509Name based on the passed in tagged object.

@param obj tag object holding name.
@param explicit true if explicitly tagged false otherwise.
@return the X509Name
328144
public static X509Name getInstance(
                                       ASN1TaggedObject obj,
                                       boolean explicit)
    {
        return getInstance(ASN1Sequence.getInstance(obj, explicit));
    }
1009950
public static X509Name getSubjectFields(X509Certificate cert) {
        try {
            return new X509Name((ASN1Sequence)getSubject(cert.getTBSCertificate()));
        }
        catch (Exception e) {
            throw new ExceptionConverter(e);
        }
    }
334640
def get_name(self, name, objid):
        '''
        
        '''
        if type(name) is tuple:
            return name

        ns = self.nspname
        n = name or self.pname or ('E' + objid)
        return ns,n
50278
public static DERBitString getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof DERBitString)
        {
            return (DERBitString)obj;
        }

        if (obj instanceof ASN1OctetString)
        {
            byte[]  bytes = ((ASN1OctetString)obj).getOctets();
            int     padBits = bytes[0];
            byte[]  data = new byte[bytes.length - 1];

            System.arraycopy(bytes, 1, data, 0, bytes.length - 1);

            return new DERBitString(data, padBits);
        }

        if (obj instanceof ASN1TaggedObject)
        {
            return getInstance(((ASN1TaggedObject)obj).getObject());
        }

        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
    }
423186
def getname(obj):
    
    for name_attribute in ('__qualname__', '__name__'):
        try:
            # an object always has a class, as per Python data model
            return getattr(obj, name_attribute, getattr(obj.__class__, name_attribute))
        except AttributeError:
            pass
    raise TypeError('object of type %r does not define a canonical name' % type(obj))
6300
public static String getXSIType(Object obj) {
        Class<?> type = obj.getClass();

        for (int i = 0; i < clazzes.length; i++) {
            if (type == clazzes[i]) {
                return xsdStrs[i];
            }
        }

        if (obj instanceof java.util.Calendar) {
            return "xsd:dateTime";
        }

        throw new RuntimeException("Unknown data type during serialization:" + type);
    }
568
def getName(obj):
    
    # elastic search does not like '.' in dict keys, so we replace by /
    def sanitize(name):
        return name.replace(".", "/")
    if isinstance(obj, _BuildStepFactory):
        klass = obj.factory
    else:
        klass = type(obj)
    name = ""
    klasses = (klass, ) + inspect.getmro(klass)
    for klass in klasses:
        if hasattr(klass, "__module__") and klass.__module__.startswith("buildbot."):
            return sanitize(name + klass.__module__ + "." + klass.__name__)
        else:
            name += ">"
    return sanitize(type(obj).__name__)
79443
public static ASN1OctetString getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof ASN1OctetString)
        {
            return (ASN1OctetString)obj;
        }

        if (obj instanceof ASN1TaggedObject)
        {
            return getInstance(((ASN1TaggedObject)obj).getObject());
        }

        if (obj instanceof ASN1Sequence)
        {
            Vector      v = new Vector();
            Enumeration e = ((ASN1Sequence)obj).getObjects();

            while (e.hasMoreElements())
            {
                v.addElement(e.nextElement());
            }

            return new BERConstructedOctetString(v);
        }

        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
    }
473266
public static String getSimpleName(FileObject fo) {
        URI uri = fo.toUri();
        String s = uri.getSchemeSpecificPart();
        return s.substring(s.lastIndexOf("/") + 1); // safe when / not found

    }
1029825
def obj_name(self, obj: Union[str, Element]) -> str:
        
        if isinstance(obj, str):
            obj = self.obj_for(obj)
        if isinstance(obj, SlotDefinition):
            return underscore(self.aliased_slot_name(obj))
        else:
            return camelcase(obj if isinstance(obj, str) else obj.name)
299355
public QName getSamlObjectQName(final Class objectType) {
        try {
            val f = objectType.getField(DEFAULT_ELEMENT_NAME_FIELD);
            return (QName) f.get(null);
        } catch (final NoSuchFieldException e) {
            throw new IllegalStateException("Cannot find field " + objectType.getName() + '.' + DEFAULT_ELEMENT_NAME_FIELD, e);
        } catch (final IllegalAccessException e) {
            throw new IllegalStateException("Cannot access field " + objectType.getName() + '.' + DEFAULT_ELEMENT_NAME_FIELD, e);
        }
    }
279700
function getTypeName(namespace, type) {
    let namespaceName = namespace.fullName;
    let finalName;
    for (let title of type.titles) {
        let name = titleToTypeName(namespaceName, title);
        if (finalName) {
            if (name[1]) {
                // An explicit type name, so make sure it isn't masking anything
                if (finalName[1] && name[0] !== finalName[0]) {
                    // Previous explicit name from another title is different
                    throw new Error(title + '\'s override to ' + name[0]
                        + ' would shadow explicit name of ' + finalName[0]);
                }
                // Otherwise take this name since it either is the same, or overrides
                // a non-explicit name
                finalName = name;
            }
            else if (!finalName[1] && name[0].length < finalName[0].length) {
                // Take the shorter of the generated names
                finalName = name;
            }
        }
        else {
            // First valid name
            finalName = name;
        }
    }
    if (finalName) {
        return finalName;
    }
    else {
        throw new Error('Unable to generate typename for ' + type.titles[0]);
    }
}
402316
public String getGetterName(String propertyName, JType type, JsonNode node) {
        propertyName = getPropertyNameForAccessor(propertyName, node);

        String prefix = type.equals(type.owner()._ref(boolean.class)) ? "is" : "get";

        String getterName;
        if (propertyName.length() > 1 && Character.isUpperCase(propertyName.charAt(1))) {
            getterName = prefix + propertyName;
        } else {
            getterName = prefix + capitalize(propertyName);
        }

        if (getterName.equals("getClass")) {
            getterName = "getClass_";
        }

        return getterName;
    }
678103
@ObjectiveCName("getSignature:")
    public static String getSignature(Class<?> clazz) {
        String primitiveSignature = PRIMITIVE_TO_SIGNATURE.get(clazz);
        if (primitiveSignature != null) {
            return primitiveSignature;
        } else if (clazz.isArray()) {
            return "[" + getSignature(clazz.getComponentType());
        } else {
            // TODO: this separates packages with '.' rather than '/'
            return "L" + clazz.getName() + ";";
        }
    }
217030
public static String getOpCodeName(int opcode) {
        if (opCodeMap.containsKey(opcode))
            return opCodeMap.get(opcode);

        return "NON_OP(" + opcode + ")";
    }
1259025
public String getAsString(Object obj, String propertyName) {
        Object o = get(obj, propertyName);
        if (o != null) {
            return o.toString();
        } else {
            return "";
        }
    }
753087
private String getDefaultInstanceName() {
            String name = getDefinition().getName() + " #";
            int i = 0;
            Treeview tree = node.getTreeview();

            while (TreeUtil.findNodeByLabel(tree, name + ++i, false) != null) {}
            return name + i;
        }