public virtual IReflectClass GetComponentType() { if (!IsArray()) { return(null); } return(_parentReflector.ForClass(_registry.ComponentType(_class))); }
public virtual void RegisterReflector(IReflector reflector) { _classReflector = reflector.ForClass(JavaClass()); var clazz = PrimitiveJavaClass(); if (clazz != null) { _primitiveClassReflector = reflector.ForClass(clazz); } }
public virtual void RegisterReflector(IReflector reflector) { _classReflector = reflector.ForClass(JavaClass()); Type clazz = PrimitiveJavaClass(); if (clazz != null) { _primitiveClassReflector = reflector.ForClass(clazz); } }
/// <summary>Returns a ReflectClass instance for the specified class</summary> /// <param name="clazz">class</param> /// <returns>a ReflectClass instance for the specified class</returns> /// <seealso cref="Db4objects.Db4o.Reflect.IReflectClass">Db4objects.Db4o.Reflect.IReflectClass /// </seealso> public virtual IReflectClass ForClass(Type clazz) { if (clazz == null) { return(null); } IReflectClass claxx = (IReflectClass)_classByClass.Get(clazz); if (claxx != null) { return(claxx); } if (!clazz.IsArray && ReflectPlatform.IsNamedClass(clazz)) { claxx = ForName(ReflectPlatform.FullyQualifiedName(clazz)); if (claxx != null) { _classByClass.Put(clazz, claxx); return(claxx); } } claxx = _delegate.ForClass(clazz); if (claxx == null) { return(null); } claxx = EnsureDelegate(claxx); _classByClass.Put(clazz, claxx); return(claxx); }
public virtual IReflectClass ForObject(object a_object) { if (a_object == null) { return(null); } return(_parent.ForClass(a_object.GetType())); }
public virtual void TestExceptionIsPropagated() { IReflector reflector = Platform4.ReflectorForType(typeof(ReflectFieldExceptionTestCase.Item )); IReflectField field = reflector.ForClass(typeof(ReflectFieldExceptionTestCase.Item )).GetDeclaredField("_name"); Assert.Expect(typeof(Db4oException), typeof(ArgumentException), new _ICodeBlock_18 (field)); }
/// <summary>returns a prototype object for a specific class.</summary> /// <remarks>returns a prototype object for a specific class.</remarks> public virtual object PrototypeForClass(Type clazz) { if (clazz == null) { throw new PrototypesException("Class can not be null"); } IReflectClass claxx = _reflector.ForClass(clazz); if (claxx == null) { throw new PrototypesException("Not found in the reflector: " + clazz); } string className = claxx.GetName(); Prototypes.Prototype prototype = (Prototypes.Prototype)_prototypes.Get(className); if (prototype != null) { return(prototype.Object()); } prototype = new Prototypes.Prototype(this, claxx); _prototypes.Put(className, prototype); return(prototype.Object()); }
public static IReflectClass[] ToMeta(IReflector reflector, Type[] clazz) { IReflectClass[] claxx = null; if (clazz != null) { claxx = new IReflectClass[clazz.Length]; for (int i = 0; i < clazz.Length; i++) { if (clazz[i] != null) { claxx[i] = reflector.ForClass(clazz[i]); } } } return(claxx); }
public static IReflectClass ReflectClassFor(IReflector reflector, object clazz) { if (clazz is IReflectClass) { return((IReflectClass)clazz); } if (clazz is Type) { return(reflector.ForClass((Type)clazz)); } if (clazz is string) { return(reflector.ForName((string)clazz)); } return(reflector.ForObject(clazz)); }
public static IReflectClass ReflectClassFor(IReflector reflector, object clazz) { if (clazz is IReflectClass) { return (IReflectClass)clazz; } if (clazz is Type) { return reflector.ForClass((Type)clazz); } if (clazz is string) { return reflector.ForName((string)clazz); } return reflector.ForObject(clazz); }
public IReflectClass GetReturnType() { return(_reflector.ForClass(method.ReturnType)); }
public virtual void RegisterReflector(IReflector reflector) { _classReflector = reflector.ForClass(typeof (string)); }
public virtual IReflectClass ForFieldType(Type type) { return(_parent.ForClass(type)); }
public virtual void RegisterReflector(IReflector reflector) { _classReflector = reflector.ForClass(typeof(string)); }
public virtual void RegisterReflector(IReflector reflector) { _classReflector = reflector.ForClass(_clazz); }
private static void AssertType(IReflector reflector, Type expected, IReflectClass actual) { Assert.AreEqual(reflector.ForClass(expected), actual); }
public virtual IReflectClass ForClass(Type clazz) { return(_delegate.ForClass(clazz)); }
public IReflectClass ForClass(Type type) { Console.WriteLine("Reflector.forClass({0})", type); return(readReflector.ForClass(type)); }
public virtual IReflectClass GetComponentType() { return(_reflector.ForClass(_type.GetElementType())); }
public static IReflectClass[] ToMeta(IReflector reflector, Type[] clazz) { IReflectClass[] claxx = null; if (clazz != null) { claxx = new IReflectClass[clazz.Length]; for (int i = 0; i < clazz.Length; i++) { if (clazz[i] != null) { claxx[i] = reflector.ForClass(clazz[i]); } } } return claxx; }
public virtual IReflectClass GetFieldType() { return(_reflector.ForClass(_field.FieldType)); }