@Override
	public boolean applyTo(Program p, TaskMonitor monitor) {
		this.program = p;

		Function func = program.getListing().getFunctionContaining(entryPt);

		if (func == null) {
			return false;
		}

		monitor.setMessage("Rename " + func.getName());

		try {
			setSignature(func);
		}
		catch (InvalidInputException e) {
			Msg.warn(this, e.getMessage());
			setStatusMsg(e.getMessage());
			return false;
		}
		catch (Exception e) {
			Msg.error(this, "Unexpected Exception: " + e.getMessage(), e);
			setStatusMsg("Invalid signature");
			return false;
		}

		return true;
	}
Constructs a new command for applying a signature to an existing function.

@param entry     entry point address for the function to be created.
@param signature function signature to apply
@param source    the source of this function signature
@param preserveCallingConvention if true the function calling convention will not be changed
@param applyEmptyComposites If true, applied composites will be resolved without their
                       respective components if the type does not already exist in the 
                       destination datatype manager.  If false, normal type resolution 
                       will occur.
@param conflictHandler conflict handler to be used when applying datatypes to the
                       destination program.  If this value is not null or 
                       {@link DataTypeConflictHandler#DEFAULT_HANDLER} the datatypes will be 
                       resolved prior to updating the destinationFunction.  This handler
                       will provide some control over how applied datatype are handled when 
                       they conflict with existing datatypes. 
                       See {@link DataTypeConflictHandler} which provides some predefined
                       handlers.
@param functionRenameOption controls renaming of the function using the name from the 
                       specified function signature.
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/ApplyFunctionSignatureCmd.java