/// <summary> /// Constructs a new /// <code>EnumConstantNotPresentException</code> /// with the current /// stack trace and a detail message based on the specified enum type and /// missing constant name. /// </summary> /// <param name="enumType">the enum type.</param> /// <param name="constantName">the missing constant name.</param> public EnumConstantNotPresentException(System.Type enumType_1, string constantName_1 ) : base("enum constant " + enumType_1.FullName + "." + constantName_1 + " is missing" ) { this._enumType = enumType_1; this._constantName = constantName_1; }
void AddGlobalMethodsFromStaticMethodsInType(System.Type type, params string[] methodNames) { MethodInfo[] methods; var query = type.GetMethods(BindingFlags.Public | BindingFlags.Static).Select(m => m); if( methodNames.Length > 0 ) query = query.Where(m => methodNames.Contains(m.Name)); methods = query.ToArray(); Class javaClass = type; foreach (var method in methods) { Member methodMember = javaClass.getMethod(method.Name, GetParametersForMethod(method)); var functionName = method.Name.ToCamelCase(); Scriptable methodFunction = new FunctionObject(functionName, methodMember, _scope); _scope.put(functionName, _scope, methodFunction); } }
public void SUTimeDefautTest() { var pipeline = new AnnotationPipeline(); pipeline.addAnnotator(new PTBTokenizerAnnotator(false)); pipeline.addAnnotator(new WordsToSentencesAnnotator(false)); var tagger = new MaxentTagger( Config.GetModel(@"pos-tagger\english-bidirectional\english-bidirectional-distsim.tagger")); pipeline.addAnnotator(new POSTaggerAnnotator(tagger)); var sutimeRules = new[] { Config.GetModel(@"sutime\defs.sutime.txt"), Config.GetModel(@"sutime\english.holidays.sutime.txt"), Config.GetModel(@"sutime\english.sutime.txt") }; var props = new Properties(); props.setProperty("sutime.rules", String.Join(",", sutimeRules)); props.setProperty("sutime.binders", "0"); pipeline.addAnnotator(new TimeAnnotator("sutime", props)); const string text = "Three interesting dates are 18 Feb 1997, the 20th of july and 4 days from today."; var annotation = new Annotation(text); annotation.set(new CoreAnnotations.DocDateAnnotation().getClass(), "2013-07-14"); pipeline.annotate(annotation); Console.WriteLine(annotation.get(new CoreAnnotations.TextAnnotation().getClass())+"\n"); var timexAnnsAll = (ArrayList)annotation.get(new TimeAnnotations.TimexAnnotations().getClass()); foreach (CoreMap cm in timexAnnsAll) { var tokens = (java.util.List)cm.get(new CoreAnnotations.TokensAnnotation().getClass()); var first = tokens.get(0); var last = tokens.get(tokens.size() - 1); var time = (TimeExpression)cm.get(new TimeExpression.Annotation().getClass()); Console.WriteLine("{0} [from char offset '{1}' to '{2}'] --> {3}", cm, first, last, (time.getTemporal())); } }
public void AddPackageFromXml(System.IO.Stream xmlStream) { _javaPackageBuilder.addPackageFromXml(DroolsDotnetUtil.getJavaStringReaderFromSystemStream(xmlStream)); }
/// <summary> /// Constructs a new /// <code>UnsupportedOperationException</code> /// with the current /// stack trace, the specified detail message and the specified cause. /// </summary> /// <param name="message">the detail message for this exception.</param> /// <param name="cause"> /// the optional cause of this exception, may be /// <code>null</code> /// . /// </param> /// <since>1.5</since> public NotSupportedException(string message, System.Exception cause) : base(message , cause) { }
/// <summary> /// Constructs a new /// <code>SecurityException</code> /// with the current stack trace /// and the specified cause. /// </summary> /// <param name="cause"> /// the optional cause of this exception, may be /// <code>null</code> /// . /// </param> /// <since>1.5</since> public SecurityException(System.Exception cause) : base((cause == null ? null : cause .ToString()), cause) { }
protected UnsatisfiedLinkError( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
protected RuntimeException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
public ThrowableException(string message, System.Exception inner) : base(message, inner) { }
/// <summary> /// Constructs a new /// <code>IllegalStateException</code> /// with the current stack /// trace and the specified cause. /// </summary> /// <param name="cause"> /// the cause of this exception, may be /// <code>null</code> /// . /// </param> /// <since>1.5</since> public InvalidOperationException(System.Exception cause) : base((cause == null ? null : cause.ToString()), cause) { }
public static ListTypeMapEntry GetValidMapping(Type targetType) { var mappings = new[] { //new ListTypeMapEntry(targetType, typeof(System.Array), "IList", "ListWrapper", "ShallowListWrapper"), new ListTypeMapEntry(targetType, typeof(List), "IList", "ListWrapper", "ShallowListWrapper"), new ListTypeMapEntry( targetType, typeof(Collection), "ICollection", "CollectionWrapper", "ShallowCollectionWrapper"), new ListTypeMapEntry( targetType, typeof(Iterable), "IEnumerable", "IterableWrapper", "ShallowIterableWrapper"), new ListTypeMapEntry( targetType, typeof(NodeList), "IList", "NodeListWrapper", "SHALLOW NODELIST NOT SUPPORTED!"), //new ListTypeMapEntry( // targetType, typeof(Map), "IDictionary", "MapWrapper", "ShallowMapWrapper"), }; return mappings.FirstOrDefault(m => m.IsValidMapping); }
public ParsingException(System.Exception exception) : base(exception) { }
public void AddPackageFromDrl(System.IO.Stream drlStream, System.IO.Stream dslStream) { _javaPackageBuilder.addPackageFromDrl(DroolsDotnetUtil.getJavaStringReaderFromSystemStream(drlStream), DroolsDotnetUtil.getJavaStringReaderFromSystemStream(dslStream)); }
public void AddPackageFromDrl(string fileName, System.IO.Stream drlStream) { _javaPackageBuilder.addPackageFromDrl(fileName, DroolsDotnetUtil.getJavaStringReaderFromSystemStream(drlStream)); }
public void AddPackageFromDrl(System.IO.Stream drlStream) { AddPackageFromDrl("", drlStream); }
public CharacterImpl(System.Char val) : base() { m_value = val; }
/// <summary> /// Constructs a new /// <code>IllegalStateException</code> /// with the current stack /// trace, the specified detail message and the specified cause. /// </summary> /// <param name="message">the detail message for this exception.</param> /// <param name="cause">the cause of this exception.</param> /// <since>1.5</since> public InvalidOperationException(string message, System.Exception cause) : base(message , cause) { }
public _ByteImpl(System.Byte val) : base() { m_value = val; }
/// <summary> /// Constructs a new /// <code>AssertionError</code> /// with the given detail message and cause. /// </summary> /// <since>1.7</since> /// <hide>1.7</hide> public AssertionError(string detailMessage, System.Exception cause) : base(detailMessage , cause) { }
public _ShortImpl(System.Int16 val) : base() { m_value = val; }
public RuntimeException(string message, System.Exception inner) : base(message, inner) { }
public _LongImpl(System.Int64 val) : base() { m_value = val; }
public UnsatisfiedLinkError(string message, System.Exception inner) : base(message, inner) { }
public _IntegerImpl(System.Int32 val) : base() { m_value = val; }
/// <summary> /// Constructs a new /// <code>SecurityException</code> /// with the current stack trace, /// the specified detail message and the specified cause. /// </summary> /// <param name="message">the detail message for this exception.</param> /// <param name="cause"> /// the optional cause of this exception, may be /// <code>null</code> /// . /// </param> /// <since>1.5</since> public SecurityException(string message, System.Exception cause) : base(message, cause) { }
public _DoubleImpl(System.Double val) : base() { m_value = val; }
public _BooleanImpl(System.Boolean val) : base() { m_value = val; }
public _FloatImpl(System.Single val) : base() { m_value = val; }
/// <summary> /// Constructs a new /// <code>UnsupportedOperationException</code> /// with the current /// stack trace and the specified cause. /// </summary> /// <param name="cause"> /// the optional cause of this exception, may be /// <code>null</code> /// . /// </param> /// <since>1.5</since> public NotSupportedException(System.Exception cause) : base((cause == null ? null : cause.ToString()), cause) { }
/// <summary> /// Constructs a new /// <code>TypeNotPresentException</code> /// with the current stack /// trace, a detail message that includes the name of the type that could not /// be found and the /// <code>Throwable</code> /// that caused this exception. /// </summary> /// <param name="typeName">the fully qualified name of the type that could not be found. /// </param> /// <param name="cause"> /// the optional cause of this exception, may be /// <code>null</code> /// . /// </param> public TypeNotPresentException(string typeName_1, System.Exception cause) : base( "Type " + typeName_1 + " not present", cause) { this._typeName = typeName_1; }