/** * Set {@code @Wire} annotation value for cached class. */ private void setWireAnnotation(CachedClass cachedClass, Wire wireAnnotation) { cachedClass.wireType = WireType.WIRE; cachedClass.wireAnnotation = wireAnnotation; cachedClass.failOnNull = wireAnnotation.failOnNull(); cachedClass.injectInherited = wireAnnotation.injectInherited(); }
/** * Set {@code @Wire} annotation value for cached class. */ private void setWireAnnotation(CachedClass cachedClass, Wire wireAnnotation) { cachedClass.wireType = WireType.WIRE; cachedClass.wireAnnotation = wireAnnotation; cachedClass.failOnNull = wireAnnotation.failOnNull(); cachedClass.injectInherited = wireAnnotation.injectInherited(); }
public CachedField getCachedField(Field field) { CachedField cachedField = namedWireCache.get(field); if (cachedField == null) { if (field.isAnnotationPresent(Wire.class)) { final Wire wire = field.getAnnotation(Wire.class); cachedField = new CachedField(field, WireType.WIRE, wire.name(), wire.failOnNull()); } else if (field.isAnnotationPresent(SkipWire.class)) { cachedField = new CachedField(field, WireType.SKIPWIRE, null, false); } else { cachedField = new CachedField(field, WireType.IGNORED, null, false); } namedWireCache.put(field, cachedField); } return cachedField; }
public CachedField getCachedField(Field field) { CachedField cachedField = namedWireCache.get(field); if (cachedField == null) { if (field.isAnnotationPresent(Wire.class)) { final Wire wire = field.getAnnotation(Wire.class); cachedField = new CachedField(field, WireType.WIRE, wire.name(), wire.failOnNull()); } else if (field.isAnnotationPresent(SkipWire.class)) { cachedField = new CachedField(field, WireType.SKIPWIRE, null, false); } else { cachedField = new CachedField(field, WireType.IGNORED, null, false); } namedWireCache.put(field, cachedField); } return cachedField; }