public CtorDescriptor(final ClassDescriptor classDescriptor, final Constructor constructor) { super(classDescriptor, ClassUtil.isPublic(constructor)); this.constructor = constructor; this.parameters = constructor.getParameterTypes(); ClassUtil.forceAccess(constructor); }
/** * Creates new field descriptor and resolve all additional field data. * Also, forces access to a field. */ public FieldDescriptor(final ClassDescriptor classDescriptor, final Field field) { super(classDescriptor, ClassUtil.isPublic(field)); this.field = field; this.type = field.getGenericType(); this.rawType = ClassUtil.getRawType(type, classDescriptor.getType()); Class[] componentTypes = ClassUtil.getComponentTypes(type, classDescriptor.getType()); if (componentTypes != null) { this.rawComponentType = componentTypes[componentTypes.length - 1]; this.rawKeyComponentType = componentTypes[0]; } else { this.rawComponentType = null; this.rawKeyComponentType = null; } // force access ClassUtil.forceAccess(field); // mapper final Mapper mapper = field.getAnnotation(Mapper.class); if (mapper != null) { mapperFunction = MapperFunctionInstances.get().lookup(mapper.value()); } else { mapperFunction = null; } }
public MethodDescriptor(final ClassDescriptor classDescriptor, final Method method) { super(classDescriptor, ClassUtil.isPublic(method)); this.method = method; this.returnType = method.getGenericReturnType();
public CtorDescriptor(final ClassDescriptor classDescriptor, final Constructor constructor) { super(classDescriptor, ClassUtil.isPublic(constructor)); this.constructor = constructor; this.parameters = constructor.getParameterTypes(); ClassUtil.forceAccess(constructor); }
/** * Creates new field descriptor and resolve all additional field data. * Also, forces access to a field. */ public FieldDescriptor(final ClassDescriptor classDescriptor, final Field field) { super(classDescriptor, ClassUtil.isPublic(field)); this.field = field; this.type = field.getGenericType(); this.rawType = ClassUtil.getRawType(type, classDescriptor.getType()); Class[] componentTypes = ClassUtil.getComponentTypes(type, classDescriptor.getType()); if (componentTypes != null) { this.rawComponentType = componentTypes[componentTypes.length - 1]; this.rawKeyComponentType = componentTypes[0]; } else { this.rawComponentType = null; this.rawKeyComponentType = null; } // force access ClassUtil.forceAccess(field); // mapper final Mapper mapper = field.getAnnotation(Mapper.class); if (mapper != null) { mapperFunction = MapperFunctionInstances.get().lookup(mapper.value()); } else { mapperFunction = null; } }
public MethodDescriptor(final ClassDescriptor classDescriptor, final Method method) { super(classDescriptor, ClassUtil.isPublic(method)); this.method = method; this.returnType = method.getGenericReturnType();