protected AnnotatedMethod _findFactory(AnnotatedClass cls, String name, Class<?>... argTypes) { final int argCount = argTypes.length; for (AnnotatedMethod method : cls.getFactoryMethods()) { if (!name.equals(method.getName()) || (method.getParameterCount() != argCount)) { continue; } for (int i = 0; i < argCount; ++i) { Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { continue; } } return method; } return null; } }
protected AnnotatedMethod _findFactory(AnnotatedClass cls, String name, Class<?>... argTypes) { final int argCount = argTypes.length; for (AnnotatedMethod method : cls.getStaticMethods()) { if (!name.equals(method.getName()) || (method.getParameterCount() != argCount)) { continue; } for (int i = 0; i < argCount; ++i) { Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { continue; } } return method; } return null; } }
protected AnnotatedMethod _findFactory(AnnotatedClass cls, String name, Class<?>... argTypes) { final int argCount = argTypes.length; for (AnnotatedMethod method : cls.getFactoryMethods()) { if (!name.equals(method.getName()) || (method.getParameterCount() != argCount)) { continue; } for (int i = 0; i < argCount; ++i) { Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { continue; } } return method; } return null; } }
/** * Method for collecting basic information on constructor(s) found */ protected void _addCreators(Map<String, POJOPropertyBuilder> props) { // can be null if annotation processing is disabled... if (!_useAnnotations) { return; } for (AnnotatedConstructor ctor : _classDef.getConstructors()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) { _addCreatorParam(props, ctor.getParameter(i)); } } for (AnnotatedMethod factory : _classDef.getFactoryMethods()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = factory.getParameterCount(); i < len; ++i) { _addCreatorParam(props, factory.getParameter(i)); } } }
AnnotatedParameter param = annotatedMethod.getParameter(i); final Type type = TypeFactory.defaultInstance().constructType(param.getParameterType(), cls); io.swagger.v3.oas.annotations.Parameter paramAnnotation = AnnotationsUtils.getAnnotation(io.swagger.v3.oas.annotations.Parameter.class, paramAnnotations[i]);
private Annotated getAnnotatedTypeFromAnnotatedMethod(AnnotatedMethod a) { if (a.getParameterCount() > 0) { return a.getParameter(0); } else if (a.hasReturnType()) { return a; } else { throw new IllegalArgumentException("Cannot have @StoredAsJson on a method with no parameters AND no arguments"); } }
protected AnnotatedMethod _findFactory(final AnnotatedClass cls, final String name, final Class... argTypes) { final int argCount = argTypes.length; final Iterator var5 = cls.getFactoryMethods().iterator(); AnnotatedMethod method; do { if (!var5.hasNext()) { return null; } method = (AnnotatedMethod) var5.next(); } while (!name.equals(method.getName()) || method.getParameterCount() != argCount); for (int i = 0; i < argCount; ++i) { final Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { ; } } return method; } }
protected AnnotatedMethod _findFactory(AnnotatedClass cls, String name, Class<?>... argTypes) { final int argCount = argTypes.length; for (AnnotatedMethod method : cls.getStaticMethods()) { if (!name.equals(method.getName()) || (method.getParameterCount() != argCount)) { continue; } for (int i = 0; i < argCount; ++i) { Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { continue; } } return method; } return null; } }
protected AnnotatedMethod _findFactory(AnnotatedClass cls, String name, Class<?>... argTypes) { final int argCount = argTypes.length; for (AnnotatedMethod method : cls.getStaticMethods()) { if (!name.equals(method.getName()) || (method.getParameterCount() != argCount)) { continue; } for (int i = 0; i < argCount; ++i) { Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { continue; } } return method; } return null; } }
protected AnnotatedMethod _findFactory(final AnnotatedClass cls, final String name, final Class... argTypes) { final int argCount = argTypes.length; final Iterator var5 = cls.getFactoryMethods().iterator(); AnnotatedMethod method; do { if (!var5.hasNext()) { return null; } method = (AnnotatedMethod) var5.next(); } while (!name.equals(method.getName()) || method.getParameterCount() != argCount); for (int i = 0; i < argCount; ++i) { final Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { ; } } return method; } }
protected AnnotatedMethod _findFactory(AnnotatedClass cls, String name, Class<?>... argTypes) { final int argCount = argTypes.length; for (AnnotatedMethod method : cls.getStaticMethods()) { if (!name.equals(method.getName()) || (method.getParameterCount() != argCount)) { continue; } for (int i = 0; i < argCount; ++i) { Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { continue; } } return method; } return null; } }
protected AnnotatedMethod _findFactory(AnnotatedClass cls, String name, Class<?>... argTypes) { final int argCount = argTypes.length; for (AnnotatedMethod method : cls.getStaticMethods()) { if (!name.equals(method.getName()) || (method.getParameterCount() != argCount)) { continue; } for (int i = 0; i < argCount; ++i) { Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { continue; } } return method; } return null; } }
private void addMethod(Method method) { FunctionType function = new FunctionType(); AnnotatedMethod annotMethod = new AnnotatedMethod(null, method, new AnnotationMap(), null); function.setResultType(getTSTypeForClass(annotMethod)); for (int i = 0; i < annotMethod.getParameterCount(); i++) { AnnotatedParameter param = annotMethod.getParameter(i); String name = "param" + i; function.getParameters().put(name, getTSTypeForClass(param)); } this.type.getMethods().put(method.getName(), function); }
/** * Method for collecting basic information on constructor(s) found */ protected void _addCreators(Map<String, POJOPropertyBuilder> props) { // can be null if annotation processing is disabled... if (_annotationIntrospector == null) { return; } for (AnnotatedConstructor ctor : _classDef.getConstructors()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) { _addCreatorParam(props, ctor.getParameter(i)); } } for (AnnotatedMethod factory : _classDef.getStaticMethods()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = factory.getParameterCount(); i < len; ++i) { _addCreatorParam(props, factory.getParameter(i)); } } }
/** * Method for collecting basic information on constructor(s) found */ protected void _addCreators(Map<String, POJOPropertyBuilder> props) { // can be null if annotation processing is disabled... if (!_useAnnotations) { return; } for (AnnotatedConstructor ctor : _classDef.getConstructors()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) { _addCreatorParam(props, ctor.getParameter(i)); } } for (AnnotatedMethod factory : _classDef.getFactoryMethods()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = factory.getParameterCount(); i < len; ++i) { _addCreatorParam(props, factory.getParameter(i)); } } }
/** * Method for collecting basic information on constructor(s) found */ protected void _addCreators() { // can be null if annotation processing is disabled... if (_annotationIntrospector != null) { for (AnnotatedConstructor ctor : _classDef.getConstructors()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) { _addCreatorParam(ctor.getParameter(i)); } } for (AnnotatedMethod factory : _classDef.getStaticMethods()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = factory.getParameterCount(); i < len; ++i) { _addCreatorParam(factory.getParameter(i)); } } } }
/** * Method for collecting basic information on constructor(s) found */ protected void _addCreators() { // can be null if annotation processing is disabled... if (_annotationIntrospector != null) { for (AnnotatedConstructor ctor : _classDef.getConstructors()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = ctor.getParameterCount(); i < len; ++i) { _addCreatorParam(ctor.getParameter(i)); } } for (AnnotatedMethod factory : _classDef.getStaticMethods()) { if (_creatorProperties == null) { _creatorProperties = new LinkedList<POJOPropertyBuilder>(); } for (int i = 0, len = factory.getParameterCount(); i < len; ++i) { _addCreatorParam(factory.getParameter(i)); } } } }
AnnotatedParameter param = factory.getParameter(i); String name = ai.findDeserializationName(param);
guiceMember = a.getParameter(0); final Annotation[] annotations = a.getMember().getParameterAnnotations()[0]; guiceAnnotation = findBindingAnnotation(Arrays.asList(annotations));
AnnotatedParameter param = factory.getParameter(i); PropertyName pn = ai.findNameForDeserialization(param); String name = (pn == null) ? null : pn.getSimpleName();