Search in sources :

Example 1 with AsnCharacterString

use of org.openmuc.jasn1.compiler.model.AsnCharacterString in project jasn1 by openmuc.

the class BerClassWriter method getBerType.

private String getBerType(AsnType asnType) {
    String fullClassName = asnType.getClass().getName();
    String className = fullClassName.substring(fullClassName.lastIndexOf('.') + 1);
    if (className.equals("AsnCharacterString")) {
        AsnCharacterString asnCharacterString = (AsnCharacterString) asnType;
        if (asnCharacterString.stringtype.equals("ISO646String")) {
            return "BerVisibleString";
        } else if (asnCharacterString.stringtype.equals("T61String")) {
            return "BerTeletexString";
        }
        return "Ber" + ((AsnCharacterString) asnType).stringtype;
    }
    return "Ber" + className.substring(3);
}
Also used : AsnCharacterString(org.openmuc.jasn1.compiler.model.AsnCharacterString) AsnBitString(org.openmuc.jasn1.compiler.model.AsnBitString) AsnCharacterString(org.openmuc.jasn1.compiler.model.AsnCharacterString) AsnOctetString(org.openmuc.jasn1.compiler.model.AsnOctetString)

Aggregations

AsnBitString (org.openmuc.jasn1.compiler.model.AsnBitString)1 AsnCharacterString (org.openmuc.jasn1.compiler.model.AsnCharacterString)1 AsnOctetString (org.openmuc.jasn1.compiler.model.AsnOctetString)1