Java 类org.eclipse.xtext.conversion.impl.AbstractValueConverter 实例源码

项目:idl4emf    文件:IDLValueConverterService.java   
@ValueConverter(rule = "longdouble_type")
public IValueConverter<PrimitiveKind> longdouble_type() {
    return new AbstractValueConverter<PrimitiveKind>() {

        public PrimitiveKind toValue(String string, INode node) {
            return PrimitiveKind.PK_LONGDOUBLE;
        }

        public String toString(PrimitiveKind value) {
            return "long double";
        }

    };
}
项目:idl4emf    文件:IDLValueConverterService.java   
@ValueConverter(rule = "longlong_type")
public IValueConverter<PrimitiveKind> longlong_type() {
    return new AbstractValueConverter<PrimitiveKind>() {

        public PrimitiveKind toValue(String string, INode node) {
            return PrimitiveKind.PK_LONGLONG;
        }

        public String toString(PrimitiveKind value) {
            return "long long";
        }

    };
}
项目:idl4emf    文件:IDLValueConverterService.java   
@ValueConverter(rule = "ushort_type")
public IValueConverter<PrimitiveKind> ushort_type() {
    return new AbstractValueConverter<PrimitiveKind>() {

        public PrimitiveKind toValue(String string, INode node) {
            return PrimitiveKind.PK_USHORT;
        }

        public String toString(PrimitiveKind value) {
            return "unsigned short";
        }

    };
}
项目:idl4emf    文件:IDLValueConverterService.java   
@ValueConverter(rule = "ulong_type")
public IValueConverter<PrimitiveKind> ulong_type() {
    return new AbstractValueConverter<PrimitiveKind>() {

        public PrimitiveKind toValue(String string, INode node) {
            return PrimitiveKind.PK_ULONG;
        }

        public String toString(PrimitiveKind value) {
            return "unsigned long";
        }

    };
}
项目:idl4emf    文件:IDLValueConverterService.java   
@ValueConverter(rule = "ulonglong_type")
public IValueConverter<PrimitiveKind> ulonglong_type() {
    return new AbstractValueConverter<PrimitiveKind>() {

        public PrimitiveKind toValue(String string, INode node) {
            return PrimitiveKind.PK_ULONGLONG;
        }

        public String toString(PrimitiveKind value) {
            return "unsigned long long";
        }

    };
}
项目:idl4emf    文件:IDLValueConverterService.java   
@ValueConverter(rule = "ID")
public IValueConverter<String> ID() {
    return new AbstractValueConverter<String>() {

        public String toValue(String string, INode node) {
            return string.startsWith("_") ? string.substring(1) : string;
        }

        public String toString(String value) {
            return value;
        }

    };
}