/** * Get the method name from lifecycle meta data. * * @param lifecycle the lifecycle meta data * @return method name or null if null lifecycle */ protected String getMethod(LifecycleMetaData lifecycle) { if (lifecycle != null) return lifecycle.getMethodName(); return null; }
/** * Get the parameters. * * @param lifecycle the lifecycle meta data * @return lifecycle parameters or null if null lifecycle */ protected List<ParameterMetaData> getParameters(LifecycleMetaData lifecycle) { if (lifecycle != null) return lifecycle.getParameters(); return null; }
/** * Is invocation ignored. * * @param lifecycle the lifecycle meta data * @return true if ignored set on lifecycle */ protected boolean isInvocationIgnored(LifecycleMetaData lifecycle) { return lifecycle != null && lifecycle.isIgnored(); }
if (lifecycle == null || lifecycle.isIgnored() == false) if (lifecycle != null && lifecycle.getMethodName() != null) method = lifecycle.getMethodName(); List<ParameterMetaData> parameters = null; if (lifecycle != null) parameters = lifecycle.getParameters(); MethodJoinpoint joinpoint; try
@XmlElement(name="create", type=AbstractLifecycleMetaData.class) public void setCreate(LifecycleMetaData create) { create.setState(ControllerState.CREATE); this.create = create; }
visitor.addDependency(di); if (create != null && create.getMethodName() == null) create.setMethodName("create"); if (start != null && start.getMethodName() == null) start.setMethodName("start"); if (stop != null && stop.getMethodName() == null) stop.setMethodName("stop"); if (destroy != null && destroy.getMethodName() == null) destroy.setMethodName("destroy"); super.initialVisit(visitor);
/** * Set the method info. * * @param lifecycle the lifecycle * @param methodInfo the method info */ protected void setMethodInfo(T lifecycle, String methodInfo) { lifecycle.setMethodName(methodInfo); } }
@XmlElement(name="start", type=AbstractLifecycleMetaData.class) public void setStart(LifecycleMetaData start) { start.setState(ControllerState.START); this.start = start; }
@XmlElement(name="stop", type=AbstractLifecycleMetaData.class) public void setStop(LifecycleMetaData stop) { stop.setState(ControllerState.START); this.stop = stop; }
@XmlElement(name="destroy", type=AbstractLifecycleMetaData.class) public void setDestroy(LifecycleMetaData destroy) { destroy.setState(ControllerState.CREATE); this.destroy = destroy; }
/** * Set the lifecycle metadata * * @param lifecycle the lifecycle metadata */ @XmlElement(name="create", type=AbstractLifecycleMetaData.class) public void setCreate(LifecycleMetaData lifecycle) { if (lifecycle != null) lifecycle.setState(ControllerState.CREATE); this.create = lifecycle; }
/** * Set the start metadata * * @param lifecycle the lifecycle metadata */ @XmlElement(name="start", type=AbstractLifecycleMetaData.class) public void setStart(LifecycleMetaData lifecycle) { if (lifecycle != null) lifecycle.setState(ControllerState.START); this.start = lifecycle; }
/** * Set the stop metadata * * @param lifecycle the lifecycle metadata */ @XmlElement(name="stop", type=AbstractLifecycleMetaData.class) public void setStop(LifecycleMetaData lifecycle) { if (lifecycle != null) lifecycle.setState(ControllerState.START); this.stop = lifecycle; }
/** * Set the destroy metadata * * @param lifecycle the lifecycle metadata */ @XmlElement(name="destroy", type=AbstractLifecycleMetaData.class) public void setDestroy(LifecycleMetaData lifecycle) { if (lifecycle != null) lifecycle.setState(ControllerState.CREATE); this.destroy = lifecycle; }