JavaDecompiler/JavaConstantInfo.cs
/// <summary>
/// Creates a java constant info by its type
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
Creates a java constant info by its type
Creates a java constant info by its type
private static JavaConstantInfo Create(ConstantInfoType type)
        {
            switch (type)
            {
                case ConstantInfoType.Class:
                    return new JavaConstantClassInfo();
                case ConstantInfoType.String:
                    return new JavaConstantStringInfo();
                case ConstantInfoType.NameAndType:
                    return new JavaConstantNameAndTypeInfo();
                case ConstantInfoType.Utf8:
                    return new JavaConstantUtf8Info();
                case ConstantInfoType.FieldRef:
                    return new JavaConstantFieldRefInfo();
                case ConstantInfoType.MethodRef:
                    return new JavaConstantMethodRefInfo();
                case ConstantInfoType.InterfaceMethodRef:
                    return new JavaConstantInterfaceMethodRefInfo();
                case ConstantInfoType.MethodHandle:
                    return new JavaConstantMethodHandleInfo();
                case ConstantInfoType.MethodType:
                    return new JavaConstantMethodTypeInfo();
                case ConstantInfoType.InvokeDynamic:
                    return new JavaConstantInvokeDynamicInfo();
                case ConstantInfoType.Integer:
                    return new JavaConstantIntegerInfo();
                case ConstantInfoType.Long:
                    return new JavaConstantLongInfo();
                case ConstantInfoType.Float:
                    return new JavaConstantFloatInfo();
                case ConstantInfoType.Double:
                    return new JavaConstantDoubleInfo();
                default:
                    throw new ArgumentException();
            }
        }
private static JavaConstantInfo Create ( ConstantInfoType type ) { switch ( type ) { case ConstantInfoType . Class : return new JavaConstantClassInfo ( ) ; case ConstantInfoType . String : return new JavaConstantStringInfo ( ) ; case ConstantInfoType . NameAndType : return new JavaConstantNameAndTypeInfo ( ) ; case ConstantInfoType . Utf8 : return new JavaConstantUtf8Info ( ) ; case ConstantInfoType . FieldRef : return new JavaConstantFieldRefInfo ( ) ; case ConstantInfoType . MethodRef : return new JavaConstantMethodRefInfo ( ) ; case ConstantInfoType . InterfaceMethodRef : return new JavaConstantInterfaceMethodRefInfo ( ) ; case ConstantInfoType . MethodHandle : return new JavaConstantMethodHandleInfo ( ) ; case ConstantInfoType . MethodType : return new JavaConstantMethodTypeInfo ( ) ; case ConstantInfoType . InvokeDynamic : return new JavaConstantInvokeDynamicInfo ( ) ; case ConstantInfoType . Integer : return new JavaConstantIntegerInfo ( ) ; case ConstantInfoType . Long : return new JavaConstantLongInfo ( ) ; case ConstantInfoType . Float : return new JavaConstantFloatInfo ( ) ; case ConstantInfoType . Double : return new JavaConstantDoubleInfo ( ) ; default : throw new ArgumentException ( ) ; } }
Creates a java constant info by its type
Creates a java constant info by its type
None
type
ConstantInfoType
None